INSERT INTO messages SET ( toaddress = 'test@durdenwebapplications.com' , fromaddress = 'Keith Palmer <[semicolon]keithp@logosoftwear.com>[semicolon]' , ccaddress = '' , bccaddress = '' , replyaddress = 'Keith Palmer <[semicolon]keithp@logosoftwear.com>[semicolon]' , senderaddress = 'Keith Palmer <[semicolon]keithp@logosoftwear.com>[semicolon]' , subject = 'subject' , message = 'message\r\n\r\nasdgljkasdg\r\n\r\n\r\nasdg' , md5 = '6e727e1461d8ea112ebf1b570618b655' , attatchment = 0 , datetime = NOW() , ID = 0 , folder_ID = 1 , status = 9 , user_ID = 2 )
You have an error in your SQL syntax near '( toaddress = 'test@durdenwebapplications.com' , fromaddress = 'Keith Palmer <
WTH is wrong with this query?!?
Moderator: General Moderators
-
superwormy
- Forum Commoner
- Posts: 67
- Joined: Fri Oct 04, 2002 9:25 am
- Location: CT
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
It might be the parenthesis since the INSERT syntax you are using doesn't seem to require them:
http://www.mysql.com/doc/en/INSERT.html
Mac
http://www.mysql.com/doc/en/INSERT.html
Mac
Isn't SET supposed to be used with UPDATE and WHERE, and not with INSERT INTO? Ex:
For INSERT INTO you would have:
SET is used to update an existing record; INSERT INTO is used to create a new record. At least that's how I've always understood it...
Code: Select all
UPDATE messages SET ( toaddress = 'test@durdenwebapplications.com' , fromaddress = 'Keith Palmer <їsemicolon]keithp@logosoftwear.com>їsemicolon]' , etc.) WHERE id=$youridCode: Select all
INSERT INTO messages (field list) VALUES (value list)- mydimension
- Moderator
- Posts: 531
- Joined: Tue Apr 23, 2002 6:00 pm
- Location: Lowell, MA USA
- Contact: