On Thursday 11 December 2003 17:45, [EMAIL PROTECTED] wrote: Please post php/db related questions to the php-db list!
> I am trying to do a "Modify(UPDATE)" and DELETE but I keep on > getting DB ERROR whenever I clicked on the links to "Modify" and > "Delete"...Gone thru my code a few times but can't spot any error. Anyone > can help?? What exactly is the DB ERROR that you're getting? Turn on FULL error reporting whilst you're developing your code. You can do so by including these lines at the top of your code: error_reporting (E_ALL); ini_set('display_errors', 1); > Below is a snip of the code: If the code posted is in the order that it is run then it looks like $sql is undefined at the moment you're trying to use it. If you had full error reporting on you would have seen that error. For debugging ALWAYS echo $sql just before you use it. > $result = $db->query($sql); > if( DB::isError($result) ) { > die ($result->getMessage()); > } > > <? > if($action==delete) Unless you really mean to be using a constant, the above should "delete", ditto for "edit" below. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Are we THERE yet? My MIND is a SUBMARINE!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php