MySQL query failing if ' key is used [SOLVED]
If a person uses a name with the symbol/key ' in it, the persons data will not be saved to the database..
any ideas? |
Re: MySQL query failing if ' key is used
Show us the query you are using. You are obviously using the ' symbol within the query
|
Re: MySQL query failing if ' key is used
well yeah..
Code:
"INSERT INTO `%s` (authid, name, date) values('%s','%s',NOW()).................so what its finally being read as is some incorrect statement and/or syntax does anyone know for SURE if the code can be changed to(ie. take the ' symbols out) Code:
"INSERT INTO `%s` (authid, name, date) values(%s,%s,NOW()).................Or does some Trim function need to be setup? |
Re: MySQL query failing if ' key is used
removing the ' characters from the query statement makes the query not work.
|
Re: MySQL query failing if ' key is used
Try this
PHP Code:
|
Re: MySQL query failing if ' key is used
http://forums.alliedmods.net/showthr...ght=apostrophe
This works.. Code:
replace_all(name, 64, "'", "");thanks for the reply. |
| All times are GMT -4. The time now is 21:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.