Plugin Activity - Error SQL Two Bugs
Category: ACP
Version Icy Phoenix 2.0 Beta (PHP 5.x - MySQL 5.x)
Description
Il Giustiziere
Mon 06 Aug, 2012 10:22
Hi,
I think there are two bugs in Activity Plugin::

FIRST:

when I try to update scores from ACP panel it give me an SQL error:

ACP --> Extra Settings --> Scores update

Quote:
SQL ERROR [ mysql4 ]
Table 'ip_scores_fixer' already exists [1050]

SQL

CREATE TABLE ip_scores_fixer (`game_name` varchar(255) default NULL, `player` varchar(40) default NULL, `score` FLOAT(10,2) DEFAULT '0' NOT NULL, `date` int(11) default NULL)

BACKTRACE

FILE: includes/db/mysql.php
LINE: 295
CALL: sql_db->sql_error()

FILE: plugins/activity/adm/admin_ina_xtras.php
LINE: 1385
CALL: sql_db->sql_query()


I tried deleting the table ip_score_fixer said that already existed, and I did update again: it give me another SQL error and practically all the scores records are cleared.


Quote:
SQL ERROR [ mysql4 ]

Column count doesn't match value count at row 1 [1136]

SQL

INSERT INTO ip_ina_scores VALUES ('2deep', 'Kiu', '1.00', '0')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 295
CALL: sql_db->sql_error()

FILE: plugins/activity/adm/admin_ina_xtras.php
LINE: 1424
CALL: sql_db->sql_query()


SECOND:

In the category page there is no link to access the games. (see screenshoot)

salagiochi
Reply
Mighty Gorgon
Sat 12 Jan, 2013 21:43
Thanks for the fix.

I'll update GIT.
Details Assigned To: Mighty Gorgon
Priority: Low
Status: Fixed
Fixed: Yes
 


 



Messages

Posted by Il Giustiziere • Wed 08 Aug, 2012 16:36


I've solved in this way, and it seem working fine.
Pleas check it

Quote:
#
############ COrrection Bugs PLUGIN ACTIVITY Iciphoenix versione 2.2
################# By Il Giustiziere
#
#
#-----[ OPEN ]------------------------------------------
#
plugins\activity\adm\admin_ina_xtras.php

#
#-----[ FIND AT LINE 1383]------------------------------------------
#
`score` FLOAT(10,2) DEFAULT '0' NOT NULL,

#
#-----[ AFTER ADD]------------------------------------------
#

`user_plays` int(6) default '0',
`play_time` int(11) default '0',

#
#-----[ FIND AT LINE 1398]------------------------------------------
#
$date = $row['date'];

#
#-----[ AFTER ADD]------------------------------------------
#
$user_plays = $row['user_plays'];
$play_time = $row['play_time'];

#
#-----[ FIND AT LINE 1401]------------------------------------------
#
VALUES ('$game_name', '". $db->sql_escape($player) ."', '$score', '$date')";

#
#-----[ REPLACE WITH]------------------------------------------
#

VALUES ('$game_name', '". $db->sql_escape($player) ."', '$score', '$user_plays', '$play_time', '$date')";

#
#-----[ FIND AT LINE 1420]------------------------------------------
#
$date = $row['date'];

#-----[ AFTER ADD]------------------------------------------
#
$user_plays = $row['user_plays'];
$play_time = $row['play_time'];

#
#-----[ FIND AT LINE 1423]------------------------------------------
#
VALUES ('$game_name', '". $db->sql_escape($player) ."', '$score', '$date')";

#
#-----[ REPLACE WITH]------------------------------------------
#

VALUES ('$game_name', '". $db->sql_escape($player) ."', '$score', '$user_plays', '$play_time', '$date')";


#
#-----[ OPEN PHPMYADMIN]------------------------------------------
#

# IF EXIST TABLE ip_score_fixer DETETE IT








  
Page 1 of 1



   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Design by DiDiDaDo

Generation Time: 0.1413s (PHP: -72% SQL: 172%)
SQL queries: 34 - Debug On - GZIP Enabled