Thread: SQLite
View Single Post
  #45  
Old 04-14-2009, 03:10 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I tried using string.escape() as you suggested, but like I thought, it escaped single quotes using a backslash which is incorrect, you're supposed to escape single quotes using another single quote.

I also suggest adding "parameterized queries." Which is basically when question marks in the query are replaced by function parameters to protect against SQL injection and stuff. Example:

executesql("INSERT INTO options VALUES (?,?)", {"profit", 9001});
__________________

Last edited by Inverness; 04-14-2009 at 05:54 PM..
Reply With Quote