Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Album name?  (Read 2728 times)

0 Members and 1 Guest are viewing this topic.

matiseijas

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Album name?
« on: March 16, 2004, 06:00:40 pm »

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

Nibbler

  • Guest
Album name?
« Reply #1 on: March 16, 2004, 06:31:03 pm »

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

Code: [Select]

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'];
}
Logged

weegee

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Album name?
« Reply #2 on: June 23, 2004, 05:25:56 am »

Works wonderful! Thanks!  ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 18 queries.