Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress Database Error

  • bbPress database error: [You have an error in your SQL syntax near ‘ON ( t.topic_id = p.topic_id ) WHERE p.post_status != ‘0’ AND t.topic_status = ” at line 1]

    SELECT p.* FROM bb_posts AS p JOIN bb_topics as t ON ( t.topic_id = p.topic_id ) WHERE p.post_status != ‘0’ AND t.topic_status = ‘0’ ORDER BY p.post_time DESC LIMIT 5

    What does it mean?

Viewing 9 replies - 1 through 9 (of 9 total)

  • chrishajer
    Participant

    @chrishajer

    What do you have to do to get that error to show up? Installation, view profile, post a new topic, post a reply, add a tag, etc…

    The problem got a bit bigger. When someone tries to find something through the search they get:

    bbPress database error: [You have an error in your SQL syntax near ‘ON ( t.topic_id = p.topic_id ) WHERE p.post_text LIKE ‘%ja%’ AND p.post_status =’ at line 1]

    SELECT p.*, 0 AS search_score, MAX(post_time) AS post_time FROM bb_posts AS p JOIN bb_topics as t ON ( t.topic_id = p.topic_id ) WHERE p.post_text LIKE ‘%ja%’ AND p.post_status = ‘0’ AND t.topic_status = ‘0’ GROUP BY t.topic_id ORDER BY p.post_time DESC LIMIT 5

    bbPress database error: [You have an error in your SQL syntax near ‘ON ( t.topic_id = p.topic_id ) WHERE t.topic_status = ‘0’ AND p.post_status = ‘0’ at line 1]

    SELECT t.*, MIN(p.post_id) as post_id, p.post_text, 0 AS search_score FROM bb_topics AS t JOIN bb_posts as p ON ( t.topic_id = p.topic_id ) WHERE t.topic_status = ‘0’ AND p.post_status = ‘0’ AND ( (t.topic_title LIKE ‘%ja%’) OR p.post_text LIKE ‘%ja%’ ) GROUP BY t.topic_id ORDER BY t.topic_time DESC LIMIT 20


    chrishajer
    Participant

    @chrishajer

    1. Has this installation always been like this, or did something change recently?

    2. What version are you running and when was it installed?

    3. Did you change hosting or make any other changes to the installation?

    4. Did your host upgrade PHP or MySQL or your .htaccess file or something else that would have affected this?

    5. What plugins are installed, and does disabling them help with the error?

    6. Does the problem described in the first post happen only when searching, or is that from something else and you now have the problem described in the last post as well?

    7. Does the problem happen when using the stock theme?

    You don’t have a normal run-of-mill type problem that can be easily and simply solved, so people are going to need more info to help.


    chrishajer
    Participant

    @chrishajer

    Interestingly, I copied and pasted your SQL query from above, and used it on my installation unchanged, and it did not error out, it just return the expected results.

    SELECT t.*, MIN(p.post_id) as post_id, p.post_text, 0 AS search_score FROM bb_topics AS t JOIN bb_posts as p ON ( t.topic_id = p.topic_id ) WHERE t.topic_status = '0' AND p.post_status = '0' AND ( (t.topic_title LIKE '%ja%') OR p.post_text LIKE '%ja%' ) GROUP BY t.topic_id ORDER BY t.topic_time DESC LIMIT 20

    See the results here.

    This is an old bbPress installation as well, 1.0-alpha from over a year ago.

    Check your mysql version number. Is it really low?

    Sorry, I don’t check this forum daily, so here’s a late answer:

    1. From what I know, it has always been like this. It’s only when I perform a search.

    2. The version is bbPress 0.9.0.2 and it was installed somewhere between june 26 and june 31.

    3. I didn’t. I only screwed around with the template files.

    4. No, they did no update or change whatsoever.

    5. Like I said, it was there before the plug-ins, but here’s the list.

    Private Forums, BBPress Private Messaging (not working), Post Count Plus – Dynamic.Titles & More!, Akismet, Avatar, Last-Post, Limit Latest Discussion, Bozo Users, BBcode Lite, Move It, Quote, Simple Onlinelist, Allow Images, Human Test for bbPress & Front Page Topics.

    6. The second error appears only when someone perform a search. The first error is only noted in the admin area, in the first tab, beneath ‘User Registrations’.

    7. Yes. It does happen.

    The MySQL version is 3.23.58.

    I’m not a big guy when it comes to coding/scripting, so I have no idea what these errors mean. I’m glad somebody wants to help.


    chrishajer
    Participant

    @chrishajer

    bbPress requires MySQL 4.0 minimum. I think 3.23 is too low:

    https://bbpress.org/about/requirements/

    Ah, I thought it was something like that. I’ve just ordered a new hosting, which works on MySQL 5.

    Thanks for the help.

    It indeed was aMySQL issue. It’s been solved now.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar