semprance
01-09-2007, 03:37 PM
Still a beginner to this stuff so I'm probably making an obvious mistake.. Any help would be much appreciated.
On my news entry page, when it gets to the stage where it is inserting data into the SQL table I get this error:
Could not insert data into NEWS: Unknown column '100002' in 'field list'.
This is particularly confusing me because the '100002' is the data I want to be inserted rather than the field name. Here is the syntax I am using:
$news_insert = "INSERT INTO `news` (`id`,`date`,`content`) VALUES(`" . $news_id . "`, `" . $news_date . "`, `" . $news_content . "`);";
mysql_query($news_insert) or die ('Could not insert data into NEWS: ' . mysql_error());
Any help would be appreciated greatly.
On my news entry page, when it gets to the stage where it is inserting data into the SQL table I get this error:
Could not insert data into NEWS: Unknown column '100002' in 'field list'.
This is particularly confusing me because the '100002' is the data I want to be inserted rather than the field name. Here is the syntax I am using:
$news_insert = "INSERT INTO `news` (`id`,`date`,`content`) VALUES(`" . $news_id . "`, `" . $news_date . "`, `" . $news_content . "`);";
mysql_query($news_insert) or die ('Could not insert data into NEWS: ' . mysql_error());
Any help would be appreciated greatly.