coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: Rodinou on August 12, 2005, 08:31:16 PM

Title: [DONE] Don't put members gallery inside a request
Post by: Rodinou on August 12, 2005, 08:31:16 PM
Sorry if I put my question here, but I haven't seen where to post ...

I have written a little fonction to call the last albums on my main page (I have dropped CpmFetch :))

Quote
    <?php

$conn = mysql_Connect('localhost','xxxx','xxxx');
mysql_select_db('rbn.cpg11d_albums',$conn);

$sql = 'select aid, title from rbn.cpg11d_albums order by aid desc limit 0, 50';
$req = mysql_query($sql);

while($data = mysql_fetch_assoc($req))
    {
    echo '<a href="http://www.sortons.net/photos/thumbnails.php?album='.$data['aid'].'" onMouseover="ddrivetip(\'Test\', 400)"; onMouseout="hideddrivetip()">'.$data['title'].'</a><br /> ';
    }

?>

I would like to exclude the last MEMBERS albums ... I don't know to do this, in php ... (I begin !)
Title: Re: Don't put members gallery inside a request
Post by: Nibbler on August 12, 2005, 08:48:49 PM
Add a restriction so that the album's category is less than 10000
Title: Re: Don't put members gallery inside a request
Post by: Rodinou on August 12, 2005, 10:59:06 PM
héhéhé ... yes yes ... but I BEGIN I don't know how to ... otherwise I don't post here :)
Title: Re: Don't put members gallery inside a request
Post by: Nibbler on August 12, 2005, 11:01:07 PM
$sql = 'select aid, title from rbn.cpg11d_albums WHERE category < 10000 order by aid desc limit 0, 50';
Title: Re: Don't put members gallery inside a request
Post by: Rodinou on August 12, 2005, 11:07:53 PM
THANX THANX THANX !

http://www.sortons.net/test-nucleus.html


It works perfectly :)