Advanced search  

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

Pages: [1]   Go Down

Author Topic: Issue with displayimage.php when performing search  (Read 3762 times)

0 Members and 1 Guest are viewing this topic.

JeWelz

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 25
    • Landman Kids
Issue with displayimage.php when performing search
« on: October 13, 2004, 03:09:30 am »

I have been modifying some of the php code (as well as some of the database information like changing the album/category via a direct db update) and I'm wondering if I've broken something because the search option is not working.

I perform a search and all of the proper thumbnails are populated via the thumbnails.php file.  Once I click on one of the thumbnails that came up from the search I get the following message:

No image to display

File: blah blah blah/coppermine/displayimage.php - Line: 621
[/color]

Line 620 and 621:
    if ($pic_count == 0) {
        cpg_die(INFORMATION, $lang_errors['no_img_to_display'], __FILE__, __LINE__);


I tried to find out where $pic_count is populated - I found an occurance of it in functions.inc.php but it doesn't make any sense to me how the functions.inc.php occurance of $pic_count is related to the usage in displayimage.php

In functions.inc.php $pic_count exists in only one place, in the case statement switch($album) where case = random:

 $result = db_query("SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $ALBUM_SET");
                $nbEnr = mysql_fetch_array($result);
                $pic_count = $nbEnr[0];
_____________________

Why is $count used in all of the other case statements other than the random one and how might this relate to my issue?  What should I try to fix my problem?  Am I looking at the right stuff? I'm not a very experienced coder and very new to PHP - please let me know what other information I need to provide to obtain assistance in finding my bug.

THANKS!!!
Julie
« Last Edit: October 30, 2004, 06:38:16 am by GauGau »
Logged

JeWelz

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 25
    • Landman Kids
Re: Issue with displayimage.php when performing search
« Reply #1 on: October 30, 2004, 05:11:29 am »

you could probably delete this post - I am no longer encountering this issue. I believe it was due to manually updating the database.  I changed the album number of photos that were stored in the database as well as their categories.

Thanks!
Julie
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.