SQL error in Blogs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Neutral Singh
    Senior Member
    • Sep 2004
    • 232
    • 3.8.x

    SQL error in Blogs

    Can anybody tell me what is causing this error all of a sudden?
    Script : http://www.sikhphilosophy.net/blog.php


    Invalid SQL:

    (
    SELECT COUNT(*) AS total,
    FROM_UNIXTIME(dateline - , '%c-%e-%Y') AS period
    FROM blog AS blog

    WHERE state IN('visible', 'moderation', 'deleted') AND dateline >= 1327170600 AND dateline < 1328539233
    GROUP BY period
    ) UNION (
    SELECT COUNT(*) AS total,
    FROM_UNIXTIME(dateline - , '%c-%e-%Y') AS period
    FROM blog AS blog
    WHERE blog.userid IN (1) AND dateline >= 1327170600 AND dateline < 1330799400
    GROUP BY period
    );

    MySQL 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 ' '%c-%e-%Y') AS period
    FROM blog AS blog

    WHERE state IN('visible', 'mo' at line 3
    Error Number : 1064
    Request Date : Monday, February 6th 2012 @ 08:10:33 PM
    Error Date : Monday, February 6th 2012 @ 08:10:34 PM
    Script : http://www.sikhphilosophy.net/blog.php
    MySQL Version : 5.0.92-community

widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...