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

sql error when a table is named $table_prefix.replace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Major Major
    • None
    • 3.0.7-PL1
    • None
    • Apache 2.2.14
      PHP 5.3.1
      MySQL 5.1.40

      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'),
      			),

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

              Created:
              Updated:
              Resolved: