salman_ahad@yahoo.com Posted November 5, 2009 Share Posted November 5, 2009 I have all kinds of data to be inserted in database table //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 Some of my data contains :-), doesn't, ), ;, #,$, etc. Am I getting this error as my table is listed as utf8_general_ci?? What is my fix?? Quote Link to comment Share on other sites More sharing options...
trq Posted November 5, 2009 Share Posted November 5, 2009 This is a mysql error, nothing to do with php. Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 5, 2009 Share Posted November 5, 2009 Probably unescaped data. Run mysql_real_escape_string on all variables that are inserted in the query. Quote Link to comment Share on other sites More sharing options...
salman_ahad@yahoo.com Posted November 5, 2009 Author Share Posted November 5, 2009 Yeah it was un escaped data...It fixed it...thanks!! Quote Link to comment 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.