fer0an Posted May 22, 2011 Share Posted May 22, 2011 hello I want add some text to my sql row as text but when I want add it I recived this error : Error: exist 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 's Book '' at line 1 anyone can help me? Quote Link to comment https://forums.phpfreaks.com/topic/237099-syntax/ Share on other sites More sharing options...
wildteen88 Posted May 22, 2011 Share Posted May 22, 2011 Characters such as ' or " will cause problems within your sql queries. You need to escape these characters. To prevent this you should pass all string values to mysql_real_escape_string before using them within your queries. Example $name = mysql_real_escape_string($_POST['name']); Quote Link to comment https://forums.phpfreaks.com/topic/237099-syntax/#findComment-1218631 Share on other sites More sharing options...
fer0an Posted May 24, 2011 Author Share Posted May 24, 2011 Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/237099-syntax/#findComment-1219497 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.