random number
#1

Hi,

I have lottery system, where is random numbers in database, for each player, but now how to check when player buy a new ticked, that numbers will by all different no match with any players. Now i store tickets numbers information in mysql database, but i don't know how to create number that no match any number in database...
Reply
#2

set your numbers column to unique

http://www.w3schools.com/sql/sql_unique.asp

and check if the query was successful
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)