SQL Error when name contains apostrophe
Code:
SQL_PrepareQuery(SqlConnection, "INSERT INTO rm_rates VALUES('%s', '%s')", steamid, name)Any idea how to fix this? |
Re: SQL Error when name contains apostrophe
search for every ' in the name and put \ before
|
Re: SQL Error when name contains apostrophe
Oh..Is this corrent?
Code:
get_user_name(id, name, 31) |
Re: SQL Error when name contains apostrophe
Quote:
Just do: Code:
SQL_PrepareQuery(SqlConnection, "INSERT INTO rm_rates VALUES(^"%s^",^"%s^")", steamid, name) |
Re: SQL Error when name contains apostrophe
Single quotes will still throw a syntax error. He has it right.
|
Re: SQL Error when name contains apostrophe
Quote:
|
Re: SQL Error when name contains apostrophe
Code:
Quote:
[IMG]http://img31.**************/img31/7528/pwntz.jpg[/IMG] |
Re: SQL Error when name contains apostrophe
Quote:
PHP Code:
PHP Code:
|
Re: SQL Error when name contains apostrophe
Hmm, that actually worked, both ways. How about that.
|
Re: SQL Error when name contains apostrophe
Quote:
|
| All times are GMT -4. The time now is 15:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.