Log in

View Full Version : Error when resetting best score ever


tarball
11-08-2014, 12:06 PM
Since I move server (new PHP / Mysql version?) I get this error while trying to remove best score ever on all games...

mySQL error: Incorrect integer value: '' for column 'bestmid' at row 1

I have been able to succesfully run the query manually by running it in phpmyadmin

UPDATE games_list SET bestscore='0',bestmid='0',besttime='0' WHERE gid IN

The 0 was missing. Which file should I update so I don't have to run the query manually in the future ?

--------------- Added 1415457361 at 1415457361 ---------------

Apache v2.4.10 (cgi-fcgi)
PHP 5.5.18
Version MySQL 5.6.21

stangger5
11-08-2014, 01:36 PM
admincp/arcade.php

Look for:
// reset best result ever
if ($IN['opt_resetbest']==1)
{
$db_string = $DB->compile_db_update_string( array ( 'bestscore' => '0', 'bestmid' => '', 'besttime' => '0' ) );
$DB->query("UPDATE ibf_games_list SET ".$db_string." WHERE gid IN ".$cat_string);
}

change :
'bestmid' => '0'

tarball
11-08-2014, 03:43 PM
Thanks! Is there any other known patch to do when updating PHP/mysql?