Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9624

sql error when a table is named $table_prefix.replace

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Invalid
    • 3.0.7-PL1
    • None
    • None
    • Apache 2.2.14
      PHP 5.3.1
      MySQL 5.1.40

    Description

      This is the sql error. Notice the extra replace in the SELECT statement

       SQL ERROR [ mysqli ]
       
      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 'replace ORDER BY replace.id LIMIT 2000' at line 2 [1064]
       
      SQL
       
      SELECT replace.id, replace.replace_str, replace.with_str FROM forum_replace replace ORDER BY replace.id LIMIT 2000

      This is the table setup in convert_XXX.php

      			array(
      				'target'		=> WORDS_TABLE,
      				'primary'		=> 'replace.id',
      				'query_first'	=> array('target', $convert->truncate_statement . WORDS_TABLE),
      				'autoincrement'	=> 'word_id',
       
      				array('word_id',				'replace.id',					''),
      				array('word',					'replace.replace_str',			'phpbb_set_encoding'),
      				array('replacement',			'replace.with_str',				'phpbb_set_encoding'),
      			),

      Attachments

        Activity

          People

            Unassigned Unassigned
            D¡cky Richard Foote [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: