I'm try to grab data on a certain amount of users in game and I was hoping this would work:
$query= "SELECT * FROM users WHERE userid='7906' TO '8055'";
I only want to grab data from userid 7906 up to userid 8055. How can I do this?
CodePudding user response:
You can check with operator as well:
$query= "SELECT * FROM users WHERE userid >='7906' AND userid <= '8055'";
CodePudding user response:
Use BETWEEN
Operator:
$query = "SELECT * FROM users WHERE userid BETWEEN 7906 AND 8055";