Advertisement:

Author Topic: upgrade from 1.1.21 to 2.0.15 Mysql error  (Read 445 times)

Offline maudio

  • Newbie
  • *
  • Posts: 2
upgrade from 1.1.21 to 2.0.15 Mysql error
« on: September 09, 2019, 06:38:39 AM »
Hello, i'm trying to upgrade my forum from 1.1.21 to 2.0.15

during the upgrade process (with upgrade.php) i've got the folling error:

Executing upgrade script 2 of 2.
Executing: "Adding permission profiles for boards." (16 of 42 - of this script)

!!Error!
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 'WHERE id_board IN (15)' at line 3



i'm using  MYSQL v.5.6 on my host.

thanks in advance

Offline shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 1,434
    • sbulen on GitHub
Re: upgrade from 1.1.21 to 2.0.15 Mysql error
« Reply #1 on: September 09, 2019, 01:27:39 PM »
My first theory is that you somehow got a null value as a $profile. 

In the file upgrade_2-0.sql, ~line 1776, change: 
Code: [Select]
// Update the board tables.
foreach ($board_updates as $profile => $boards)
{
if (empty($boards))
continue;

$boards = implode(',', $boards);

To:
Code: [Select]
// Update the board tables.
foreach ($board_updates as $profile => $boards)
{
if (empty($boards) || empty($profile))
continue;

$boards = implode(',', $boards);

& let us know if this works!

Note we've seen 2 of these today... 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline maudio

  • Newbie
  • *
  • Posts: 2
Re: upgrade from 1.1.21 to 2.0.15 Mysql error
« Reply #2 on: September 09, 2019, 05:00:06 PM »
It works ! thanks a lot.
great support !