求助!!!!

求助!!!!

mysql操作,有时成功,有时候却抛出: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 study focuses on ____________. A)the consequences of lying in various communc' at line 1,哪个高人可以告诉我什么问题?

mysql语法错误。
最好把sql语句发出来
毕业了。。。

一个是:INSERT INTO `save` ( `Id` , `Level` , `Sort` , `Type` , `Content` , `Userid` , `NO` , `Date` , `id_no` , `article` ) VALUES (NULL , '$leve', '$sot', '$tye', '$conten', '$userid', '$k', NOW( ), '$id_no', '0')

sql语法好像没要错误。
有时成功有时不行的话说明是这个sql的一些变量有问题。
很可能是你没有转义就插入了。比如说 $leve 变量里如果包含单引号',
而你没有转义,那肯定会出错。要用 addslashes() 函数转义
比如
$sql = "INSERT INTO `save` ( `Id` , `Level` ) VALUES (NULL , '".addslashes($leve)."')";
毕业了。。。

呵呵,万分感谢!!