bcode Posted November 19, 2009 Share Posted November 19, 2009 It is giving me an Error in your SQL syntax near 'float,rentprice) Values (' but I can't see where the problem is $sql = "INSERT INTO Listings "; $sql .= "(propName, price, description, type, city, state, image1, authorized,country, address, zipcode, featured, ownerID,ownerEmail,bedrooms,bathrooms,resortName,deed,cc4digit,ccexp,unitNum,float,rentprice)"; $sql .= " VALUES ('$propName','$price','$description','$type','$city','$state','$imagepath','no','$country','$address','$zipcode','$featured','$ownerid','$email','$bed','$bath','$resortname','$deed','$CC4','$CCX','$unit','$float','$rentalprice')"; Link to comment https://forums.phpfreaks.com/topic/182170-mysql-problem/ Share on other sites More sharing options...
premiso Posted November 19, 2009 Share Posted November 19, 2009 http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html Float is a reserved word. Either enclose it in backticks (not preferred) or change the name to a non-reserved word (preferred). Link to comment https://forums.phpfreaks.com/topic/182170-mysql-problem/#findComment-961138 Share on other sites More sharing options...
bcode Posted November 19, 2009 Author Share Posted November 19, 2009 Awesome i did not know that thank you i just changed the name and it worked i was looking at it for so long thinking I miss spelled a word. Link to comment https://forums.phpfreaks.com/topic/182170-mysql-problem/#findComment-961147 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.