Is there a problem with this MySQL Query?
Posted
by ThinkingInBits
on Stack Overflow
See other posts from Stack Overflow
or by ThinkingInBits
Published on 2010-05-10T18:04:44Z
Indexed on
2010/05/10
19:14 UTC
Read the original article
Hit count: 373
- The echos at the top all display valid data that fit the database schema.
- There are no connection errors
Any ideas?
Thanks in advance!
Here is the echo'ed query
INSERT INTO equipment (cat_id, name, year, manufacturer, model, price, location, condition, stock_num, information, description, created, modified) VALUES (1, 'r', 1, 'sdf', 'sdf', '2', 'd', 'd', '3', 'asdfasdfdf', 'df', '10 May 10', '10 May 10')
MySQL is giving: #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 'condition, stock_num, information, description, created, modified) VALUES (1, 'r' at line 1
id int(11) unsigned NO PRI NULL auto_increment
Edit Delete cat_id int(11) unsigned NO NULL
Edit Delete prod_name varchar(255) YES NULL
Edit Delete prod_year varchar(10) YES NULL
Edit Delete manufacturer varchar(255) YES NULL
Edit Delete model varchar(255) YES NULL
Edit Delete price varchar(10) YES NULL
Edit Delete location varchar(255) YES NULL
Edit Delete condition varchar(25) YES NULL
Edit Delete stock_num varchar(128) YES NULL
Edit Delete information text YES NULL
Edit Delete description text YES NULL
Edit Delete created varchar(20) YES NULL
Edit Delete modified varchar(20) YES NULL
Query: INSERT INTO equipment (cat_id, prod_name, prod_year, manufacturer, model, price, location, condition, stock_num, information, description, created, modified) VALUES (1, 'asdf', '234', 'adf', 'asdf', '34', 'asdf', 'asdf', '234', 'asdf', 'asdf', '10 May 10', '10 May 10')
© Stack Overflow or respective owner