What is wrong with this!?!
11-13-09, 04:42 AM
New Member
Join Date: Nov 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
What is wrong with this!?!
Over an hour now I'm starting to go mad...
INSERT INTO union (AutoID, first_name, organisation, post_code, email, contact, resident, parliament, alphabeta, courage, Regdate) VALUES ('', 'ben', 'bencorp', 'cty12ld', 'will@hot.com', 'address12321', '1', 'bush', '0', '4', '12')
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'union (AutoID, first_name, organisation, post_code, email, contact, resident, pa' at line 1
gaaaaah please help
11-13-09, 06:27 AM
Level II Curmudgeon
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
I think you may be running into trouble by using "UNION" for a table name.
"UNION" is a reserved word, so if you're going use it as a table name (not really a good idea) then you'll need to put backticks (`) around it.
11-13-09, 07:01 AM
New Member
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
UNION is a key word. try this.
INSERT INTO [union] (AutoID, first_name, organisation, post_code, email, contact, resident, parliament, alphabeta, courage, Regdate) VALUES ('', 'ben', 'bencorp', 'cty12ld', 'will@hot.com', 'address12321', '1', 'bush', '0', '4', '12')
11-13-09, 08:52 PM
Aspiring Coder
Join Date: Mar 2009
Location: North Carolina, USA
Posts: 516
Thanks: 5
Thanked 47 Times in 44 Posts
or this
PHP Code:
INSERT INTO ` union ` ( AutoID , first_name , organisation , post_code , email , contact , resident , parliament , alphabeta , courage , Regdate ) VALUES ( '' , 'ben' , 'bencorp' , 'cty12ld' , 'will@hot.com' , 'address12321' , '1' , 'bush' , '0' , '4' , '12' )
11-14-09, 11:02 AM
New Member
Join Date: Nov 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
omg
Omg lol I'll give that a try and get back to you.
Who knew?
well... you guys obvisously... but not me...
11-14-09, 11:11 AM
New Member
Join Date: Nov 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
yes it worked thankyou very much.
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off