[PHP-DB] error

2011-04-07 Thread Chris Stinemetz
I am getting the following error when I try to use my edit.php script: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 I can't seem to find anything wrong with my syntax below. Has anyone ever had

Re: [PHP-DB] error

2011-04-07 Thread Karl DeSaulniers
I believe this line should read.. ini_set('display_errors', 1); Just something I think I caught. Might not be your solution though. HTH, Karl On Apr 7, 2011, at 11:00 PM, Chris Stinemetz wrote: ini_set('display_errors', '1'); Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP

Re: [PHP-DB] error

2011-04-07 Thread Jim Giner
The two query statements are different - in one you quote $id and in the other you don't. It is definitely a mysql error so it's not the line you suggested. Karl DeSaulniers k...@designdrumm.com wrote in message news:6fe62364-f9fc-4612-8c5d-6ce48fc66...@designdrumm.com... I believe this line

Re: [PHP-DB] error

2011-04-07 Thread Chris Stinemetz
I am pretty sure it is in my code. I am just getting an error form one of my echoes. Still can't get it to work correctly though. Any help is greatly appreciated. Thank you, Chris ?php /* EDIT.PHP Allows user to edit specific entry in database */ // creates the edit record form // since

Re: [PHP-DB] error

2011-04-07 Thread Karl DeSaulniers
Hi Chris, I believe you only need to do a htmlspecialchars when displaying data as readable text that your retrieved from the database after inserting. And probably some other situations as well, but I don't think you need to do htmlspecialchars on the mysql_real_escape data when inserting

Re: [PHP-DB] error

2011-04-07 Thread Karl DeSaulniers
Hi Chris, Try this.. Or season to taste.. $q = UPDATE expiringleases SET Cricket_Region = '.mysql_real_escape_string($Cricket_Region).', Market = . $Market.' WHERE Search_Ring = '.mysql_real_escape_string($id).'; mysql_query($q) or die(mysql_error()); Best, Karl On Apr 8, 2011, at 12:13

Re: [PHP-DB] error

2011-04-07 Thread Karl DeSaulniers
Ooops. Sry, forgot an escape. $q = UPDATE expiringleases SET Cricket_Region = '.mysql_real_escape_string($Cricket_Region).', Market = .mysql_real_escape_string($Market).' WHERE Search_Ring = '.mysql_real_escape_string($id).'; mysql_query($q) or die(mysql_error()); Best, Karl On Apr