Jump to content

Edit History

a-d-g

a-d-g

11 hours ago, musicmaster said:

Maybe this file solves that problem?

copy_shopdata.php 11.07 kB · 0 downloads

it doesn't solve, and in my opinion is not a good solution, your are removing tables without PREFIX in your log printed when script finish, in my case i want to know which table weren't copied, even if those tables dont have PREFIX, because were tables created to work with my personal scripts, and i need to use it in new database, is good to show it in "not copied warning".

OLD TABLES						NOT COPIED (this way is shown when script finish)
actualizar_stock					ualizar_stock
tabla_auxiliar						la_auxiliar
ps_example1						example1
ps_example2						example2
ps_example3						example3
...								...
...								...

As you can see above those table in old prestashop which doesn't have PREFIX will be shown cutted on final log, you can fix it with next change in line 36:

while($row = mysqli_fetch_row($res))
{ $oldtables[] = substr($row[0], $len);
}

you have to edit with this:

while($row = mysqli_fetch_row($res))
{ $oldtables[] = substr($row[0], 0, $len) == _OLD_PREFIX_  ? substr($row[0], $len) : $row[0];
}

Thanks.

a-d-g

a-d-g

11 hours ago, musicmaster said:

Maybe this file solves that problem?

copy_shopdata.php 11.07 kB · 0 downloads

it doesn't solve, i will try to explain my case, i have the below tables in my old database, note that first and second table doesn't have PREFIX, don't ask me why, were tables created to work with my personal scripts, and i didn't create with PREFIX

OLD TABLES						NOT COPIED (this way is shown when script finish)
actualizar_stock					ualizar_stock
tabla_auxiliar						la_auxiliar
ps_example1						example1
ps_example2						example2
ps_example3						example3
...								...
...								...

As you can see above those table in old prestashop which doesn't have PREFIX will be shown cutted on final log, you can fix it with next change in line 36:

while($row = mysqli_fetch_row($res))
{ $oldtables[] = substr($row[0], $len);
}

you have to edit with this:

while($row = mysqli_fetch_row($res))
{ $oldtables[] = substr($row[0], 0, $len) == _OLD_PREFIX_  ? substr($row[0], $len) : $row[0];
}

Thanks.

a-d-g

a-d-g

9 hours ago, musicmaster said:

Maybe this file solves that problem?

copy_shopdata.php 11.07 kB · 0 downloads

it doesn't solve, i try to explain my case, i have the below tables in my oldtables

OLD TABLES						NOT COPIED (this way is shown when script finish)
actualizar_stock					ualizar_stock
tabla_auxiliar						la_auxiliar
ps_example1						example1
ps_example2						example2
ps_example3						example3
...								...
...								...

As you can see above those table in old prestashop which doesn't have PREFIX will be shown cutted on final log, you can fix it with next change in line 36:

while($row = mysqli_fetch_row($res))
{ $oldtables[] = substr($row[0], $len);
}

you have to edit with this:

while($row = mysqli_fetch_row($res))
{ $oldtables[] = substr($row[0], 0, $len) == _OLD_PREFIX_  ? substr($row[0], $len) : $row[0];
}

Thanks.

×
×
  • Create New...