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