Trium918 Posted July 16, 2007 Share Posted July 16, 2007 What is the syntax for allowing can't, don't, they're etc? Because I am getting this error "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 't". Quote Link to comment https://forums.phpfreaks.com/topic/60289-question/ Share on other sites More sharing options...
trq Posted July 16, 2007 Share Posted July 16, 2007 You need to escape certain chars, see mysql_real_escape_string. Quote Link to comment https://forums.phpfreaks.com/topic/60289-question/#findComment-299886 Share on other sites More sharing options...
MadTechie Posted July 17, 2007 Share Posted July 17, 2007 Or addslashes Quote Link to comment https://forums.phpfreaks.com/topic/60289-question/#findComment-299943 Share on other sites More sharing options...
rameshfaj Posted July 17, 2007 Share Posted July 17, 2007 It might be due to unexpected closing of the query string by the characters(',"') when inserted in the other sense by us. The solution is to try avoid these or Use different qutoation marks for starting and ending of the query string as: $query=" Here the symbol ' can be inserted"; $query='Here the symbol "" can be inserted';. This is my opinion and I tried in some cases and had worked but never tried with the words like can't and so on. Quote Link to comment https://forums.phpfreaks.com/topic/60289-question/#findComment-300004 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.