News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

Extracting one random pic for display on another page...

Started by johnnyt, October 29, 2003, 11:29:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

johnnyt

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:
I'm beta testing life...

hyperion

"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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

johnnyt

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  :)
I'm beta testing life...

hyperion

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.  :)
"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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

johnnyt

Okeedokee, will do. Thanks for your help matey.

Keep up the good work with the gallery.

Cheers

JT  :lol:
I'm beta testing life...