Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-1029

Sql error clicking "View new posts | View your posts" links

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • None
    • 3.0.B1
    • Search
    • None
    • PHP Environment:
      Database:

      Running MySQL 3.23.49 (old i know)

      1. A webserver or web hosting account running on any major Operating System with support for PHP
      2. A SQL database system, one of:
      • MySQL 3.23 or above (MySQLi supported)
      • PostgreSQL 7.x
      • SQLite
      • Firebird 1.5+/Interbase 7.1+
      • MS SQL Server 2000 or above (directly or via ODBC)
      • Oracle

      clicking the "View new posts | View your posts" Links generates a sql error.

      Clicking "View new posts" produces this error

      General Error
      SQL ERROR [ mysql ]

      You have an error in your SQL syntax near ')) ORDER BY t.topic_last_post_time DESC LIMIT 1001' at line 5 [1064]

      SQL

      SELECT DISTINCT t.topic_last_post_time, p.topic_id FROM phpbb_topics t, phpbb_posts p WHERE p.post_time > 1150803667 AND t.topic_id = p.topic_id AND (p.post_approved = 1 OR p.forum_id NOT IN ()) ORDER BY t.topic_last_post_time DESC LIMIT 1001

      BACKTRACE

      FILE: includes/db/mysql.php
      LINE: 104
      CALL: dbal->sql_error()

      FILE: includes/db/mysql.php
      LINE: 152
      CALL: dbal_mysql->sql_query()

      FILE: search.php
      LINE: 378
      CALL: dbal_mysql->sql_query_limit()

      Clicking "View your posts" produces this error

      General Error
      SQL ERROR [ mysql ]

      You have an error in your SQL syntax near ')) ORDER BY t.topic_last_post_time DESC' at line 9 [1064]

      SQL

      SELECT t.*, f.forum_id, f.forum_name, tp.topic_posted, tt.mark_time, ft.mark_time as f_mark_time FROM phpbb_topics t LEFT JOIN phpbb_forums f ON (f.forum_id = t.forum_id) LEFT JOIN phpbb_topics_posted tp ON (tp.user_id = 2 AND t.topic_id = tp.topic_id) LEFT JOIN phpbb_topics_track tt ON (tt.user_id = 2 AND t.topic_id = tt.topic_id) LEFT JOIN phpbb_forums_track ft ON (ft.user_id = 2 AND ft.forum_id = f.forum_id) WHERE t.topic_id IN (3, 1, 2) AND (t.topic_approved = 1 OR t.forum_id NOT IN ()) ORDER BY t.topic_last_post_time DESC

      BACKTRACE

      FILE: includes/db/mysql.php
      LINE: 104
      CALL: dbal->sql_error()

      FILE: search.php
      LINE: 547
      CALL: dbal_mysql->sql_query()

            naderman Nils Adermann
            karlsemple karlsemple [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: