Database query error Database query error
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Database query error

Started by Bazzah, January 19, 2007, 04:45:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bazzah

I recently noticed that when listing images in a SUB category by last uploaded or last commented, you were unable to click the thumbnail to view the intermediate image, as you would get the following error:

Fatal error: Call to undefined function: db_query() in /home/hiresco1/public_html/gallery/displayimage.php on line 259

I don't know anything about php, so I messed around to try and get it working. After removing line 257:

$res = db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='{$CURRENT_PIC_DATA['pid']}' AND author_id = ".USER_ID);

it worked perfectly. Obviously I am a bit concerned about removing code, as I do not know what else it will affect. Can anyone help me?

Nibbler

That is 1.3 code. Why is it in your 1.4 gallery? Replace displayimage.php with a clean copy from the download package.

Bazzah

Thanks for the reply. I have no idea why it is in there. I will replace it. Thanks

Bazzah

 ;D Thanks. Works perfectly now!

Nibbler

If you updated your gallery from 1.3 to 1.4 then there may be other old files, use versioncheck.php.