Quote:
Originally Posted by LoneAngelIbesu
... Wha? That's what escaping is, and the point of escaping is to prevent SQL injections, not because SQLite can't handle quotation marks. 
|
I'm tempted to say the same thing to you: wha?
If you feed SQLite as string such as:
it will enter perfectly fine:
PHP Code:
INSERT INTO table (column) VALUES ('test "foo" bar')
str.escape() places backslashes in front of quotations. Basically, it does:
PHP Code:
INSERT INTO table (column) VALUES ('test \"foo\" bar')
It's literally inserted into SQLite as:
PHP Code:
test \"foo\" bar
Unlike single quotations, quotation marks don't need to be escaped, and escaping them only makes strings enter incorrectly.
I think maybe you thought I was referring to single quotes instead of quotation marks in my post, sorry; could've been more clear about that.