lordphate Posted November 8, 2006 Share Posted November 8, 2006 Okay I know this is probably REALLY simple but i'm having this error:INSERT INTO photo_comments_profile (mem_id,pho_id,comment,date,author) VALUES (100079,100098,'sdg',NOW(),Brandon):Unknown column 'Brandon' in 'field list'I know that means somethings up with my SQL...so here's that piece[code]$info = auth_member(); $values = form_handle_input("photo_comment"); $sql_query = "INSERT INTO photo_comments_profile (mem_id,pho_id,comment,date,author) VALUES (:mem_id:,:pho_id:,':comment:',NOW(),".$info["fname"].")"; $vals["mem_id"] = $info["mem_id"]; $vals["pho_id"] = $values["pho_id"]; $vals["comment"] = $values["comment"]; $vals["date"] = $values["date"]; $vals["fname"] = $info["fname"];[/code] Link to comment https://forums.phpfreaks.com/topic/26531-argive-been-up-way-too-long/ Share on other sites More sharing options...
Skatecrazy1 Posted November 8, 2006 Share Posted November 8, 2006 very messy here:[code](:mem_id:,:pho_id:,':comment:',NOW(),".$info["fname"].")";[/code] Link to comment https://forums.phpfreaks.com/topic/26531-argive-been-up-way-too-long/#findComment-121388 Share on other sites More sharing options...
roopurt18 Posted November 8, 2006 Share Posted November 8, 2006 Enclose your last value for the sql statement in single quotes. Don't forget to escape the string. Link to comment https://forums.phpfreaks.com/topic/26531-argive-been-up-way-too-long/#findComment-121389 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.