FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Way to make random mysql not repeat





Poetsunited
Is there a way, besides storing everything it shows...

my script works like this : it randomly selects a word from the database, and asks you for the translation, you submit it, it checks whether its correct or not and it gets a new word...


Is there a way to make it random but without repeating ( the problem i'd have with storing is that if multiple people are doing it it won't show all the words for them unless if i store them with their ip or w/e + the db with the logs would be too big I reckon )

thanks,

kev
rvec
store the ids they got in their session or cookie and in the mysql query use a where ... not in(...) statement to exclude those ids.
Related topics
mysql connection question
php admin and mysql admin console
Mysql And PHP HELP PLZ
Question about MySQL!
E-Cards with PHP & MySQL
Random Post on phpBB
A very good PHP MySQL Tutorial
Who is PHP and MySQL local server program best
PHP/MySQL challenge, take it if you dare
select x random rows from database
IE8 not allowing new random image on each page (PHP and CSS)
phpBB Module for Hot, Random, and Recent Topics?
which host do u like put php&mysql?
DOES LIFE ORIGINATE BY CHANCE (EVOLUTION) ?
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.