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: [DONE] Don't put members gallery inside a request  (Read 3145 times)

0 Members and 1 Guest are viewing this topic.

Rodinou

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • Tournicoti, Tournicota
    • http://www.sortons.net
[DONE] Don't put members gallery inside a request
« 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 !)
« Last Edit: August 12, 2005, 11:10:44 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Don't put members gallery inside a request
« Reply #1 on: August 12, 2005, 08:48:49 pm »

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

Rodinou

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • Tournicoti, Tournicota
    • http://www.sortons.net
Re: Don't put members gallery inside a request
« Reply #2 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 :)

Nibbler

  • Guest
Re: Don't put members gallery inside a request
« Reply #3 on: August 12, 2005, 11:01:07 pm »

Code: [Select]
$sql = 'select aid, title from rbn.cpg11d_albums WHERE category < 10000 order by aid desc limit 0, 50';
Logged

Rodinou

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • Tournicoti, Tournicota
    • http://www.sortons.net
Re: Don't put members gallery inside a request
« Reply #4 on: August 12, 2005, 11:07:53 pm »

THANX THANX THANX !

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


It works perfectly :)
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 15 queries.