SA-MP Forums Archive
sqlite string escaping? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: sqlite string escaping? (/showthread.php?tid=97008)



sqlite string escaping? - [nl]daplayer - 12.09.2009

In PHP there is an function for escaping strings. ex. sqlite_escape_string()
But in pawn there isn't.

So, my question is: are there any custom/build-in functions for escaping strings for sqlite in pawn?


Re: sqlite string escaping? - gotenks918 - 12.09.2009

Maybe you could write your own? Sure it wouldn't be hard.


Re: sqlite string escaping? - [nl]daplayer - 12.09.2009

Quote:
Originally Posted by gotenks918
Maybe you could write your own? Sure it wouldn't be hard.
i thought of that already, but i don't know wich Characters need to escaped with what in sqlite, i am new to sqllite so...

I used to work with mysql.


Re: sqlite string escaping? - gotenks918 - 12.09.2009

hehe yeah same. Maybe you could do a little bit of research?

http://uk2.php.net/manual/en/functio...ape-string.php

That's the PHP page for it, it says somethings which are escaped but doesn't mention them all.


Re: sqlite string escaping? - [nl]daplayer - 12.09.2009

yeah, single quotes and un-safe binary characters.

But what are un-safe binary characters? I tryd to search but found only what it means and now. What they are.


Re: sqlite string escaping? - gotenks918 - 12.09.2009

At a quick glance I can't actually find any thing on it, sry. Maybe there is some documentation for sqlite which will explain it all but I'm not sure.


Re: sqlite string escaping? - [nl]daplayer - 12.09.2009

hmmm, the best i can do is Escape quotes, but if there is any other function please post it here.