Mysql error.... have to escape?
this is the error in the log files
Quote:
PHP Code:
|
Re: Mysql error.... have to escape?
I'm not sure if it's the problem you're experiencing but I'm pretty sure you don't need to put apostrophes around the numbers.
Further, you're mixing the INSERT syntax and the UPDATE syntax. INSERT is "INSERT INTO tablename (field1, field2, field3) VALUES (value1, value2, value3)". |
Re: Mysql error.... have to escape?
well the query itself does work quite perfect.
The problem is just the value for the field name. Usually it works, but in this special case there came an error if the clientname was like "N^ 80^". i get the clienname this way: PHP Code:
PHP Code:
|
Re: Mysql error.... have to escape?
What kind of SQL datastore? MySQL?
|
Re: Mysql error.... have to escape?
yes, its mysql
|
Re: Mysql error.... have to escape?
Will you at least try the correct syntax for the INSERT INTO command?
http://dev.mysql.com/doc/refman/5.0/en/insert.html |
Re: Mysql error.... have to escape?
well.... read the page you posted...
the second syntax example ist just what i used for the insert command... however.... i discovered the mistake... the user just had a ' in his name, so the query got crashed. i now replace ' in clientname with an emtpy string |
Re: Mysql error.... have to escape?
Just escape the apostrophe.
Hmm... Didn't realize MySQL allowed that variation of the INSERT INTO command. |
Re: Mysql error.... have to escape?
well, how to escape the apostrophe?
i use this now: Quote:
|
Re: Mysql error.... have to escape?
\
Code:
|
| All times are GMT -4. The time now is 10:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.