Album name? Album name?
 

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

Album name?

Started by matiseijas, March 16, 2004, 06:00:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

matiseijas

Hello, is there a PHP variable that gives me the name of the album the pic belongs to?

Nibbler

I dont know if this already exists, but it's quite a simple function to make:


function which_album($pid)
{
global $CONFIG;
$result = db_query ("SELECT a.title as title FROM {$CONFIG['TABLE_ALBUMS']} as a,{$CONFIG['TABLE_PICTURES']} as p WHERE p.pid = $pid AND a.aid = p.aid");
$row = mysql_fetch_array($result);
return $row['title'];
}

weegee

Works wonderful! Thanks!  ;D