View Single Post
Old Sep 24th, 2005, 1:50 AM   #8
raspberryh
Newbie
 
raspberryh's Avatar
 
Join Date: Sep 2005
Location: Orlando, FL
Posts: 2
Rep Power: 0 raspberryh is on a distinguished road
linuxpimp, that sounds cool, but what if the user wants to delete a quote? then say they delete quote with id 3, and then the code randomly generates a 3, then when you do your "select * from quotes where id=3" you will get no result.
but i think instead, you could generate a random # between 0 and the total # of quotes. then do "select * from quotes limit [random#], 1" so it picks the [random#]-th one.
raspberryh is offline   Reply With Quote