[DONE] Don't put members gallery inside a request [DONE] Don't put members gallery inside a request
 

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]

Main Menu

[DONE] Don't put members gallery inside a request

Started by Rodinou, August 12, 2005, 08:31:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rodinou

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 !)

Nibbler

Add a restriction so that the album's category is less than 10000

Rodinou

héhéhé ... yes yes ... but I BEGIN I don't know how to ... otherwise I don't post here :)

Nibbler

$sql = 'select aid, title from rbn.cpg11d_albums WHERE category < 10000 order by aid desc limit 0, 50';

Rodinou