Page 1 of 1

MySQL Warning Error

PostPosted: Sat Nov 29, 2003 6:28 pm
by Khokolate
I got the following error after install the new version from scratch and then try to view the last customer log. I shouldn't get that error even if thier havent been any visitors. I will check to see if I still get it after thier are visitors.

Code: Select all
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/tig/public_html/counter/libraries/functions.lib.php on line 1101

Cont..

PostPosted: Sat Nov 29, 2003 7:07 pm
by Khokolate
This error still appears after the script records visitors.

PostPosted: Sun Nov 30, 2003 5:06 pm
by steve
In admin/admin3.php
Just before the line
Code: Select all
$custtotal = get_totalrows('tbl_userlog');
add the new line
Code: Select all
$tbl_userlog = PPHL_TBL_USERLOG;

Wroks Fine Now.

PostPosted: Sun Nov 30, 2003 5:40 pm
by Khokolate
thank you for all the help...

fixed in CVS

PostPosted: Mon Dec 01, 2003 7:32 pm
by pipo
This has been fixed in CVS.
If you don't wish to edit files manually, get the pphlogger-CVS_latest.tar.gz (CVS snapshot, updated daily) and replace the following files:

  • /libraries/functions.lib.php
  • /dspLogs.php
  • /dspBrowserOs.php
  • /admin/admin3.php

here's the CVS-diff if you wish to manually apply changes:

Code: Select all
=====================================================================
SUMMARY
C pphlogger/libraries/functions.lib.php 1.111  ->  1.112 Sun, 30 Nov 2003 12:53:15 +0100
C pphlogger/dspLogs.php 1.29  ->  1.30 Sun, 30 Nov 2003 12:53:16 +0100
C pphlogger/dspBrowserOs.php 1.21  ->  1.22 Sun, 30 Nov 2003 12:53:16 +0100
C pphlogger/admin/admin3.php 1.16  ->  1.17 Sun, 30 Nov 2003 12:53:16 +0100
=====================================================================
C pphlogger/libraries/functions.lib.php 1.111  ->  1.112 Sun, 30 Nov 2003 12:53:15 +0100

1097,1098c1097
<    global $$table;
<    $sql = "SELECT count(*) AS total FROM ".$$table;
---
>    $sql = "SELECT count(*) AS total FROM ".$table;
=====================================================================
C pphlogger/dspLogs.php 1.29  ->  1.30 Sun, 30 Nov 2003 12:53:16 +0100

52c52
< $logtotal = get_totalrows('tbl_logs');
---
> $logtotal = get_totalrows($tbl_logs);
=====================================================================
C pphlogger/dspBrowserOs.php 1.21  ->  1.22 Sun, 30 Nov 2003 12:53:16 +0100

37c37
<    $logtotal = get_totalrows('tbl_logs',$logs_from,$logs_to);
---
>    $logtotal = get_totalrows($tbl_logs,$logs_from,$logs_to);
39c39
<    $logtotal = get_totalrows('tbl_logs');
---
>    $logtotal = get_totalrows($tbl_logs);
=====================================================================
C pphlogger/admin/admin3.php 1.16  ->  1.17 Sun, 30 Nov 2003 12:53:16 +0100

52c52
< $custtotal = get_totalrows('tbl_userlog');
---
> $custtotal = get_totalrows(PPHL_TBL_USERLOG);