Re: SQL Error
| From: | Michael J. Pawlowsky | Date: | Tue, 31 Dec 2002 00:40:14 +0000 |
| Subject: | Re: SQL Error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129723@lists.php.net to get a copy of this message | ||
I just tried this in MySQL and it inserted no problem
INSERT INTO c_emotes VALUES (6, ':-)');
Mike
*********** REPLY SEPARATOR ***********
On 30/12/2002 at 7:14 PM Stephen wrote:
I'm having some troubles. I have an install script which runs a lot of SQL statements to create
tables then insert info into them. One of them is an emoticons table. Here's the error I'm
getting:
You have an error in your SQL syntax near '; INSERT INTO c_emotes VALUES \(':\)',
'emotes/smile.gif'\); INSERT INTO c_emo' at line 4
or, if I change my code a little, it's this:
You have an error in your SQL syntax near '; INSERT INTO c_emotes VALUES \(':)',
'emotes/smile.gif'\); INSERT INTO c_emo' at line 4
Here's my code which inserts the information:
INSERT INTO c_emotes VALUES (':)', 'emotes/smile.gif'); // I also have tried
placing a \ infront of the )...no luck
INSERT INTO c_emotes VALUES (';)', 'emotes/wink.gif');
INSERT INTO c_emotes VALUES (':(', 'emotes/sad.gif');
INSERT INTO c_emotes VALUES (':P', 'emotes/tounge.gif');
INSERT INTO c_emotes VALUES (':|', 'emotes/blank.gif');
INSERT INTO c_emotes VALUES (':-|', 'emotes/blank.gif');
INSERT INTO c_emotes VALUES (':-)', 'emotes/smile.gif');
INSERT INTO c_emotes VALUES (';-)', 'emotes/wink.gif');
INSERT INTO c_emotes VALUES (':-P', 'emotes/tounge.gif');
INSERT INTO c_emotes VALUES (':-(', 'emotes/sad.gif');
Anyone see the problem??
Thanks,
Stephen Craton
http://www.melchior.us
"What is a dreamer that cannot persevere?" -- http://www.melchior.us