CorgaE Posted November 22, 2009 Report Share Posted November 22, 2009 (edited) 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. Edited November 22, 2009 by CorgaE Link to comment Share on other sites More sharing options...
justsomeguy Posted November 22, 2009 Report 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now