note 99300 added to sqlite3.escapestring
| From: | alecatalecnewmandotcom at osu1 dot php dot net | Date: | Mon, 09 Aug 2010 21:14:31 +0000 |
| Subject: | note 99300 added to sqlite3.escapestring | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171497@lists.php.net to get a copy of this message | ||
The reason this function doesn't escape double quotes is because double quotes are used with
names (the equivalent of backticks in MySQL), as in table or column names, while single quotes are
used for values.
This is important to remember, especially coming from another SQL implementation. It can cause
strange problems, for example, the query:
SELECT * FROM table WHERE column1="column1"
Would actually return every record, because column1 is always equal to column1. This should instead
be:
SELECT * FROM table WHERE column1='column1'
Double quotes are not escaped by the function because they are not interpreted specially within
single quoted strings.
----
Server IP: 208.69.120.55
Probable Submitter: 66.213.128.134
----
Manual Page -- http://www.php.net/manual/en/sqlite3.escapestring.php
Edit -- https://master.php.net/note/edit/99300
Del: integrated -- https://master.php.net/note/delete/99300/integrated
Del: useless -- https://master.php.net/note/delete/99300/useless
Del: bad code -- https://master.php.net/note/delete/99300/bad+code
Del: spam -- https://master.php.net/note/delete/99300/spam
Del: non-english -- https://master.php.net/note/delete/99300/non-english
Del: in docs -- https://master.php.net/note/delete/99300/in+docs
Del: other reasons-- https://master.php.net/note/delete/99300
Reject -- https://master.php.net/note/reject/99300
Search -- https://master.php.net/manage/user-notes.php