Go to Post Being called coach for the first time by some of my team. My dad was a football player and when I told him that story he teared up a bit. Me? A Coach? - MysterE [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > CD Forum Support
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 29-04-2003, 23:06
Jack's Avatar
Jack Jack is offline
FIRST Scouting Network
AKA: Andrew Schenk
FRC #0201 (The FEDS)
Team Role: Alumni
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Rochester Hills
Posts: 643
Jack is a jewel in the roughJack is a jewel in the roughJack is a jewel in the rough
Send a message via AIM to Jack
come on here brandon

ok.. don't really know the setup of the spotlight table.. but I'd guess there's some autoindex. (1-x)

So....

SELECT max(spotlight_id) FROM spotlight_list

vB query...

$pick_this_one = rand(0, $spotlight_id_max);

SELECT * FROM spotlight_list WHERE spotlight_id = $pick_this_one

Yup... there ya go.

or... I guess you could base it on session time or system time. (IE: total_spotlights % some_value)

yeah... i know... i needs 2 queries
OR... assumeing that vB has some "master config" table which takes all the fields/rows and dumps it into an array, you could have a config value max_spotlight. That's like 100 extra bytes and only requires to be run when a post is spotlighted.

Jack

PS: FYI to anyone.. Brandon really doesn't need the big roadmap i gave him .. I just wanted to have some fun

edit: the perfict way to bring down cd. Add a field to the user table which is updated every page refresh to the next spotlight_id - Would never get repeates tho
__________________
Team 201 - 2003 Great Lakes Semifinalists & 2003 Archimedes Division Finalists :|: Webmaster of www.feds201.com -> FBI Scouting
Winner of The 2003 ChiefDelphi Web Award for: User That Started The Most Non Chit Chat Threads
Winner of: 2003 FIRST Ventures with 5451.68 End Points

All about me: http://knehcsa.vze.com
**Check out the New FIRST Scouting Network**

Last edited by Jack : 29-04-2003 at 23:42.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
External Spotlights Brandon Martus CD Forum Support 17 04-12-2003 21:38
how random are the spotlights? Joe Ross CD Forum Support 7 11-01-2003 23:27


All times are GMT -5. The time now is 14:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi