Mysql Escape - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mysql Escape (
/showthread.php?tid=415673)
Mysql Escape -
Dotayuri - 14.02.2013
how do i get this
THIS
To let people use the '_' sign ?
Re: Mysql Escape -
3ventic - 14.02.2013
Your MySQL plugin should have a built-in mysql_real_escape_string() which should preserve characters as they are, but preventing SQL injection by escaping them (sending a short code instead of the character itself).
Re: Mysql Escape -
Dotayuri - 14.02.2013
Thank you, This is what i have i dont know why its not working. do you see anything wrong ?
PHP код:
format(Query, sizeof(Query), "SELECT * FROM `gta` WHERE 'username' = '%s'", DB_Escape(username));
Result = db_query(Database, Query)
Re: Mysql Escape -
iggy1 - 14.02.2013
Quote:
Originally Posted by Dotayuri
Thank you, This is what i have i dont know why its not working. do you see anything wrong ?
PHP код:
format(Query, sizeof(Query), "SELECT * FROM `gta` WHERE 'username' = '%s'", DB_Escape(username));
Result = db_query(Database, Query)
|
If you think your using MYSql then i see something wrong. The code you posted is SQLite.
Re: Mysql Escape -
Dotayuri - 14.02.2013
Quote:
Originally Posted by iggy1
If you think your using MYSql then i see something wrong. The code you posted is SQLite.
|
What do you think i should change it to then ?