Jump to content

MySQL is...


Neptunus Maris

Recommended Posts

MySQL is terrible at giving error reports...but anyways...

 

does anything look wrong about this? $query = "INSERT INTO contact_jobs (ID, name, desc, posterID, price, post_date) VALUES('', '$name', '$desc', '$posterID', '$price', NOW())";

 

 

The error:

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 'desc, posterID, price, post_date) VALUES('', 'Test', 'sdfsf', '1', 'sds1', NOW()' at line 1'

 

 

My answer is:  uh...what???

Link to comment
https://forums.phpfreaks.com/topic/54653-mysql-is/
Share on other sites

Name must be a column name that has a special meaning else where. In MySQL you can create column names such as date, password etc that have double meanings. So when you use them in a query you have to backtick ( ` ) them so MySQL knows it is looking at a column and not at the true meaning.

 

So when it hit that spot it said, "Whoa wait a second name shouldn't be here".

Link to comment
https://forums.phpfreaks.com/topic/54653-mysql-is/#findComment-270283
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.