CorgaE Posted November 22, 2009 Share Posted November 22, 2009 Hi there.I have been trying to get this to work out for me, but i never get anywhere with it. So i hopefully some of you could help me out.I got 4 datafields in mySQL. It looks like:name || lottonumber1 || lottonumber2 ||lottonumber3And on the site i have 4 inputs for each of the datafields.The problem is that i dont want to let the users have same numbersat all. Atm they are able to have like:name || lottonumber1 || lottonumber2 ||lottonumber3Corgae 1 2 3noob 1 2 3So what i need is: All 3 inputs on the site needs to get checked if the numbers exits in the fields. So it for example will be like:CorgaE 1 2 3Noob 4 5 6All help is really appricated. Link to comment Share on other sites More sharing options...
justsomeguy Posted November 22, 2009 Share Posted November 22, 2009 Send a SQL query to look up records with those three numbers, and check how many rows were returned. If it returned more than 0 rows then the numbers already exist. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.