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 Quote 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. Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/17577-i-hate-syntax-problems/#findComment-74891 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.