0

i have a new forum up using SMF, and i’m trying to convert the database to UTF-8 now. SMF provides an easy way to do this, but upon doing so, i get this strange sounding 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 'before before blob not null,
change column after after blob not null,
...' at line 6
file: /home/halfmoon/public_html/sources/managemaintenance.php
line: 664

i’m an extreme newbie to coding, especially when it comes to SQL, so i have 0 idea what the error means, other than where to find it and that the line is incorrect. if need be i can also copy and paste the line’s full text here as well- not sure what all is needed!:

line 664 starts at ‘updates_blob’

SQL Vers.:

“ // Change the columns to binary form. $smcFunc['db_query']('', ' ALTER TABLE {raw:table_name}{raw:updates_blob}', array( 'table_name' => $table_info['Name'], 'updates_blob' => substr($updates_blob, 0, -1), ) );

MariaDB Vers.:

        // Convert the character set if MySQL has no native support for it.
        if (isset($translation_tables[$_POST['src_charset']]))
        {
            $update = '';
            foreach ($table_charsets as $charset => $columns)
                foreach ($columns as $column)
                    $update .= '
                        ' . $column['Field'] . ' = ' . strtr($replace, array('%field%' => $column['Field'])) . ',';

            $smcFunc['db_query']('', '
                UPDATE {raw:table_name}
                SET {raw:updates}',
                array(
                    'table_name' => $table_info['Name'],
                    'updates' => substr($update, 0, -1),
                )
            );
        }port for it.”
eskie
  • 1
  • 1
  • This only gives us a vague idea what the SQL statement is, since it's generated by PHP. Can you enable query logging on MariaDB and show us the exact SQL statement being executed? – kmoser Oct 02 '20 at 16:56
  • i just pasted it into the default mariaDB query, but i'm not sure if i was supposed to login to my site's database on mariaDB rather than the default one... i'm sorry- i've just been using everything through my webhosting platform, so this is very confusing to me. – eskie Oct 02 '20 at 18:19

0 Answers0