I have a simple insert query that is getting a 1064 error on one of the fields.
I have some includes that resize, upload images and spits out files names to insert in db that work fine.
I think it is hanging up on the "aerial" field. i have tried renaming it changing it from text to varchar with no luck.
here is the info
<?php
$query = "INSERT INTO land_sales (id,title,township,county,state,price,listed_by,notice_link,offer_link,location_map,stand_map,aerial,contract)
values ('0','$tract_name Tract','$township','$county','$state','$price','Timberlands Unlimited','$db_pdf_names[0]','$db_pdf_names[1],'$db_pdf_names[2]','$db_pdf_names[3]','$db_jpg_names[0]',0)";
$result = mysql_db_query ($DBName, $query, $Link) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
?>
here is the error output.
A fatal MySQL error occured.
Query: INSERT INTO land_sales (id,title,township,county,state,price,listed_by,notice_link,offer_link,location_map,stand_map,aerial,contract) values ('0','Morris Tract','Merry Hill','Bertie','NC','52,000','Timberlands Unlimited','Morris_notice6e849d9fd6fb38b97d4a260dc9132913.pdf','Morris_offerf4a740ac794d456d4fae34d2bf35c631.pdf,'Morris_pdf_location5e216d0b3cf379757ad3a15356ca9de3.pdf','Morris_pdf_standd369343f21e484ec481acce28be788ad.pdf','Morris_photo10f0f90241400a86e6d2d4652db948f7.jpg',0)
Error: (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 'Morris_pdf_location5e216d0b3cf379757ad3a15356ca9de3.pdf','Morri