Go Back   Pligg CMS Forum > Pligg Help > General Help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-06-2007, 01:14 PM
Pligg Donor
 
Join Date: Aug 2006
Posts: 41
Thanks: 3
Thanked 0 Times in 0 Posts
How to access database for pulling a random quote

I'm not sure if this is the right place to post this, so forgive me if it isn't.

I'm wanting to add a random quote/saying that will be displayed in the header section of my site. I'd like to create a table (quotes) that would contain a quote_id and the quote data itself.

Can someone tell me how I can pull the data out of the database? I'll generate a random number for the quote_id and use that in the SQL for the database call. The question I am having is how do I pass the SQL?
Reply With Quote
  #2 (permalink)  
Old 07-06-2007, 01:40 PM
P1mpPanther's Avatar
Constant Pligger
 
Join Date: Feb 2007
Posts: 292
Thanks: 47
Thanked 10 Times in 9 Posts
I'm almost positive that there are already scripts out there that do this, and for free - I'm suggesting this since it doesn't sound like you are using Pligg data (stories) to display randomly, rather quotes.

With that said, if you are looking to integrate this within Pligg, I'd probably start by pulling apart the Random Story mod and modifying it to pull data from the table you want.
__________________
RunStream :: RSS feed creator | RSS Marketing Platform | TagBlast!

...and a Pligg site on deck!
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Friendly Database Unavailable Error Message LeoNel Suggestions 2 09-09-2007 09:19 PM
database during install phalcon Installation and Upgrade Help 2 07-24-2007 10:17 AM
random database error finalwebsites General Help 1 07-18-2007 03:32 PM
Database argh2xxx Bug Report 4 06-26-2007 10:04 PM
Database name, username, password = what?!?! starguy Installation and Upgrade Help 4 06-10-2007 03:29 AM


Search Engine Friendly URLs by vBSEO 3.2.0