运行PHP文件时 出现Could not query: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 '(postDate,"%D %M %Y %H:%i:%s"), postDate from bbs Order By id desc' at line 2
打开phpmyadmin
#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 '(postDate,"%D %M %Y %H:%i:%s"), postDate from bbs Order By id desc LIMIT 0, 30' at line 1
SELECT id, Ename, email, contentDATE_FORMAT( postDate, "%D %M %Y %H:%i:%s" ) , postDate
FROM bbs
ORDER BY id DESC 
LIMIT 0 , 30
我晕啊
#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 '(postDate,"%D %M %Y %H:%i:%s"), postDate from bbs Order By id desc LIMIT 0, 30' at line 1
SELECT id, Ename, email, contentDATE_FORMAT( postDate, "%D %M %Y %H:%i:%s" ) , postDate
FROM bbs
ORDER BY id DESC 
LIMIT 0 , 30
各位救命

解决方案 »

  1.   

    很明显,sql 错误啊。。SELECT id, Ename, email, content(***这里没分开****)DATE_FORMAT( postDate, "%D %M %Y %H:%i:%s" )
      

  2.   

    SELECT id, Ename, email, contentDATE_FORMAT( postDate, "%D %M %Y %H:%i:%s" ) ....
      

  3.   

    sql语句有错SELECT id, Ename, email, content, DATE_FORMAT( postDate, "%D %M %Y %H:%i:%s" ) , postDate
    FROM bbs
    ORDER BY id DESC 
    LIMIT 0 , 30