Announcement

Collapse
No announcement yet.

Blogs page is not working

Collapse
This topic is closed.
X
X
Collapse
First Prev Next Last
  • Filter
  • Time
  • Show
Clear All
new posts

    Blogs page is not working

    Hello,

    I recently imported the blogs, but there seems to be a issue with the blogs page. I am thinking it is related to the date format that i uploaded, but i might be wrong.

    This is the error i am getting:
    Database error in vBulletin 4.2.5:

    Invalid SQL:

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

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

    MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND dateline >= 1514073600 AND dateline < 1517702400
    GROUP BY period
    )' at line 12
    Error Number : 1064
    Request Date : Thursday, January 11th 2018 @ 01:16:04 PM
    Error Date : Thursday, January 11th 2018 @ 01:16:04 PM
    Script : http://localhost/motortopia/blog.php?do=bloglist
    Referrer : http://localhost/motortopia/forum.php
    Classname : vB_Database_MySQLi
    MySQL Version : 10.1.29-MariaDB


    And this is the php warning at the top of the page:

    PHP Warning: mysqli_query(): (42000/1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND dateline >= 1514073600 AND dateline < 1517702400 GROUP BY period )' at line 12 in ..../includes/class_core.php on line 1386


    Any help is highly appreciated.


    Thank you!

    #2
    The list of userids is missing.
    Code:
    WHERE blog.userid IN () AND dateline >= 1514073600
    Where did you import the blogs from and how did you import them?

    Comment


      #3
      Hello glennrocksvb ,

      Thank you for helping me out. I am importing from a custom built forum based on CodeIgniter, and right now i am in the process of ending the data migration.
      Thanks to you i looked carefully in the datbase, and noticed that i added some worng values in table called blog_user. That is why the blog page was giving errors.

      This step is now fixed.

      Do i need to close this thread now?

      I will post more questions in this forum for sure, as i still need to migrate all files, and connect them.


      Thank you once again!

      Comment


        #4
        Glad to help. Will close this topic.

        Comment

        Working...
        X