WatsonN Posted October 7, 2010 Share Posted October 7, 2010 Hey yall Ive got an issue with a mysql INSERT Query string: INSERT INTO `YBK_Ads` (`BSN`, `CNF`, `CNL`, `ADD`, `CITY`, `STATE`, `ZIP`, `ToA`, `AS`, `PT`, `CN`, `BY`, `ACI`, `TAN`, `VM`, `Date`) VALUES ('Business/Service Name', 'First', 'Last', 'Address', 'City', '38002', 'Business', '1/8', 'Bill', 'check', 'No', 'Ad Copy • Artwork/Photo Instructions', 'Yes', 'No', 'October 6, 2010, 7:15 pm') Produced an error: Column count doesn't match value count at row 1 where is the code mysql_real_escape_string($insert = "INSERT INTO `YBK_Ads` (`BSN`, `CNF`, `CNL`, `ADD`, `CITY`, `STATE`, `ZIP`, `ToA`, `AS`, `PT`, `CN`, `BY`, `ACI`, `TAN`, `VM`, `Date`) VALUES ('{$e1}', '{$e71}', '{$e72}', '{$e2}', '{$e3}', '{$e5}', '{$e10}', '{$e13}', '{$e11}', '{$e6}', '{$e12}', '{$e8}', '{$e15}', '{$e16}', '{$date}')"); mysql_query($insert) or die( 'Query string: ' . $insert . '<br />Produced an error: ' . mysql_error() . '<br />' ); Link to comment https://forums.phpfreaks.com/topic/215300-mysql-error/ Share on other sites More sharing options...
PFMaBiSmAd Posted October 7, 2010 Share Posted October 7, 2010 Your query lists 16 columns, but there are only 15 data values, i.e. Column count doesn't match value count Link to comment https://forums.phpfreaks.com/topic/215300-mysql-error/#findComment-1119631 Share on other sites More sharing options...
WatsonN Posted October 7, 2010 Author Share Posted October 7, 2010 Oh well If I had of read it right Sorry for the waste of time Link to comment https://forums.phpfreaks.com/topic/215300-mysql-error/#findComment-1119638 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.