exception 'PDOException' with message 'SQLSTATE[42000]
程序处理数据库报错!错误信息:exception'PDOException'withmessage'SQLSTATE[42000]:Syntaxerrororaccess...
程序处理数据库报错!
错误信息:
exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 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 ''' at line 1' in F:\taojin\class\DB.class.php:283 Stack trace: #0 F:\taojin\class\DB.class.php(283): PDOStatement->execute() #1 F:\taojin\cron\get_show.php(99): DB->execute() #2 {main}
SQL语句:select count(*) as mac_num, fk_channel from t_show_log where left(create_time,10) = '2011-06-30' AND fk_channel='14' group by mac
直接在数据库里sql语句可以执行 而且没有错误!!但是程序运行却 报这个错误!!
静等高手!!! 展开
错误信息:
exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 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 ''' at line 1' in F:\taojin\class\DB.class.php:283 Stack trace: #0 F:\taojin\class\DB.class.php(283): PDOStatement->execute() #1 F:\taojin\cron\get_show.php(99): DB->execute() #2 {main}
SQL语句:select count(*) as mac_num, fk_channel from t_show_log where left(create_time,10) = '2011-06-30' AND fk_channel='14' group by mac
直接在数据库里sql语句可以执行 而且没有错误!!但是程序运行却 报这个错误!!
静等高手!!! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询