note 71204 added to function.odbc-do
| From: | stalker at osu1 dot php dot net | Date: | Thu, 16 Nov 2006 08:11:16 +0000 |
| Subject: | note 71204 added to function.odbc-do | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119798@lists.php.net to get a copy of this message | ||
$sql = INSERT INTO table (field1,field2,field3,field4) VALUES ("text value 1", "text
2",3,"text 4")";
of cos u will get an error fro php due to double quotes inside double quotes. The correct way of
doing that is
$sql = "INSERT INTO table (field1, field2, field3, field4) VALUES
(\"text1\", \"text2\", \"text3\", \"text4\")";
Dont forget the backslash when u want to insert a " within double quotes.
----
Server IP: 66.163.161.117
Probable Submitter: 60.48.252.234
----
Manual Page -- http://www.php.net/manual/en/function.odbc-do.php
Edit -- https://master.php.net/note/edit/71204
Del: integrated -- https://master.php.net/note/delete/71204/integrated
Del: useless -- https://master.php.net/note/delete/71204/useless
Del: bad code -- https://master.php.net/note/delete/71204/bad+code
Del: spam -- https://master.php.net/note/delete/71204/spam
Del: non-english -- https://master.php.net/note/delete/71204/non-english
Del: in docs -- https://master.php.net/note/delete/71204/in+docs
Del: other reasons-- https://master.php.net/note/delete/71204
Reject -- https://master.php.net/note/reject/71204
Search -- https://master.php.net/manage/user-notes.php