RE: [PHP-DB] MySQL not updating...

From: Date: Tue, 06 Jun 2000 19:20:48 +0000
Subject: RE: [PHP-DB] MySQL not updating...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-227@lists.php.net to get a copy of this message
You might want to try echoing the SQL statement that is actually going to be passed to your database to your browser, then access MySQL via the command line and paste your SQL statement and see if MySQL produces an error. This will help you track down your problem easier as you will be able to see exactly why MySQL isn't updating your table. Sam Masiello System Analyst Chek.Com (716) 853-1362 x289 smasiello@chekinc.com -----Original Message----- From: Mark McCray [mailto:mm@tbwachiat.com] Sent: Tuesday, June 06, 2000 3:17 PM To: php-db@lists.php.net Subject: [PHP-DB] MySQL not updating... Hey there, Has anyone experienced problems using PHP4 to update MySQL databases? I know it sounds a little weird, but it seems that whenever I have created a new table that I want to work with and create a new php page to deal with it, the sql statements I use to update or insert into the table never actually update the table. Yet no error is returned. I'm on linux, using mysql and apache 1.3.12. My db connect statements all work for sure. And I've verified that the user I specify in my connect statements have access to the tables. The sql code is as follows: /////// if ($submit) { // This will process the form $sql = "INSERT INTO hist_info (fname,lname,dept,title,prior_agencies,nature_of_business,"; $sql .= "categories,previous_clients,areas_of_interest) VALUES ('$fname','$lname',"; $sql .= "'$dept','$title','$nature_of_business','$categories','$previous_clients',"; $sql .= "'$areas_of_interest')"; $iresult = mysql_query($sql); echo "Thank you! Information entered.\n"; } else { // It just displays the form again. } ?> ////// Maybe I'm not committing changes or something? Thanks! Marky -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#227) next »