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: Extracting one random pic for display on another page...  (Read 5223 times)

0 Members and 1 Guest are viewing this topic.

johnnyt

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Extracting one random pic for display on another page...
« on: October 29, 2003, 11:29:54 am »

I'm just playing around with your FANTASTIC gallery (I'm very very impressed with it). I'm looking at using it for an ID Parade page that I have on my site. Its just a collection of photos that people have sent me.

My question is this...

I would like to be able to display one random pic on the front page of the site with a link along the lines of "Have a look at the ID Parade" and then a pic.

How do I access the database to extract one picture from it ? I'm no expert with php and sql but I'm not a complete newbie either. I can connect to the database etc but what query do I need to run and on which table in order to get a random picture ?

Any help is greatly appreciated.

Cheers

JT

PS. Keep up the excellent work with the script  :wink:
Logged
I'm beta testing life...

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Extracting one random pic for display on another page...
« Reply #1 on: October 29, 2003, 06:09:50 pm »

do a search for ssi.php
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

johnnyt

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Extracting one random pic for display on another page...
« Reply #2 on: October 29, 2003, 06:43:46 pm »

Thanks for the advice but you could you expand a little ? Do a search where for ssi.php ? On Google or on this site ? I've searched on this site and found a similar problem posted by someone else and they were attempting to resolve it. The admin said something about anycontent.php ??

Could you give me a bit more info please ?

My main page is a .php file and I just want to add a random picture from my database (ie. out of the coppermine database) into a table.

What would the query look like ?

Any help much appreciated.

Thanks  :)
Logged
I'm beta testing life...

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Extracting one random pic for display on another page...
« Reply #3 on: October 30, 2003, 02:56:54 am »

Don't mind me, I'm just babbling on about a module that I just remembered we don't suggest using anymore.  :) SInce you know something about php, go look at the code for the random picture block.  You'll see how to construct the query.  :)
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

johnnyt

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Extracting one random pic for display on another page...
« Reply #4 on: October 30, 2003, 09:35:04 am »

Okeedokee, will do. Thanks for your help matey.

Keep up the good work with the gallery.

Cheers

JT  :lol:
Logged
I'm beta testing life...
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 14 queries.