Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Nibbler's Random Photo Avatar based on owner  (Read 2895 times)

0 Members and 1 Guest are viewing this topic.

Carver

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Nibbler's Random Photo Avatar based on owner
« on: February 15, 2005, 07:16:54 pm »

Nibbler, was kind enough to share his random image script with me that he uses to create his avatar on this site. It works great so good in fact that everyone on my site seems to want to be able to do the same thing and use a random thumbnail from their gallery for their avatar.

I am php challenged and while I understand what I need to do I am not able to get it spelled out in working code.

This is the basic query that is ran now
Code: [Select]
$result = mysql_query("SELECT filename,filepath from cpg132_pictures WHERE
approved='YES' AND aid <> 111 and owner_name='Carver'ORDER BY RAND() DESC LIMIT 1");
$row = mysql_fetch_array($result);

What would be needed to have this recognize the user and load only the thumbnails he/she owns with out having to use the where clause " owner_name='Carver'" but based on the member's id

Hope I am explaining this so you can follow along...

Thanks
« Last Edit: February 15, 2005, 08:53:14 pm by Carver »
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 19 queries.