How do I fix this SQL Syntax error concerning blobs?

275 Views Asked by At

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.”
0

There are 0 best solutions below