BrotherLogic Posted August 15, 2006 Share Posted August 15, 2006 I need help with some syntax in an INSERT QUERY. [code]$insertfundquery = "INSERT INTO longterm( fid, fundname, starrating) VALUES ('$fundname', '$starrating')";[/code]Half way through a loop this script comes up in error becuase $fundname = MacKenzie'sWhat is the right syntax to include apostrophes in a string........Is there a way?Thanks Everyone Link to comment https://forums.phpfreaks.com/topic/17577-i-hate-syntax-problems/ Share on other sites More sharing options...
AndyB Posted August 15, 2006 Share Posted August 15, 2006 use addslashes() on data that's posted to the database. Link to comment https://forums.phpfreaks.com/topic/17577-i-hate-syntax-problems/#findComment-74889 Share on other sites More sharing options...
BrotherLogic Posted August 15, 2006 Author Share Posted August 15, 2006 :-[ I'm such a dope sometimes!!Thanks Budd..Really Appreciated. Link to comment https://forums.phpfreaks.com/topic/17577-i-hate-syntax-problems/#findComment-74891 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.