SA-MP Forums Archive
mysql INSERT INTO - 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 INSERT INTO (/showthread.php?tid=557016)



mysql INSERT INTO - Banditukas - 12.01.2015

Hi,

Using %e in INSERT INTO query gives me e string in database what a ? i write a normal test


Re: mysql INSERT INTO - M4D - 12.01.2015

%e is like %s but %e automaticly escape your string to avoid sql injections


Re: mysql INSERT INTO - Banditukas - 12.01.2015

I know that but i say that when i use %e the string is not normal...


Re: mysql INSERT INTO - M4D - 12.01.2015

When player enter a string and you want send it to db
For example
Register dialog
Change password
Or for example edit email
Somthing like this


Re: mysql INSERT INTO - Banditukas - 12.01.2015

Read what i write.. All is well, but in database text what i write is 'e' but i write a normal text with %s is everything normal..


Re: mysql INSERT INTO - PowerPC603 - 12.01.2015

Can you show the query?
Do you use the "mysql_format" or the normal "format" provided by PAWN?

Also, with which variable-type is your column defined in MySQL?
For strings, just use varchar type fields.


Re: mysql INSERT INTO - Banditukas - 12.01.2015

I just changed %s to %e and then not normal things start to write.. I change to %s everything is well. For update queries, select all is well. I use mysql_tquery