forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: ian ditch on December 05, 2005, 01:34:48 am

Title: Cat Details From Database
Post by: ian ditch on December 05, 2005, 01:34:48 am
Sorry for reffering to an old post but I've hit a brick wall and I need your help.

I asked a question HERE (http://forum.coppermine-gallery.net/index.php?topic=24185.0) and was given the answer which did help me out, however, what I want to do now is to show the same info (user_name etc) but on the 'Home > User galleries' page.

In the address bar this is a 'cat=' and not 'album="

Previous Answer
Quote
$aid = (int) $_GET['album'];
$result = db_query("SELECT u.* FROM {$CONFIG['TABLE_USERS']} AS u INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.category - " . FIRST_USER_CAT . " = u.user_id AND a.aid = '$aid'");
$user = mysql_fetch_assoc($result);
print_r($user);

Please help