Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
08-24-2011, 01:58 AM #1
- Join Date
- Jul 2010
- Thanked 18 Times in 18 Posts
select all from a database and find position of a certain entry
I need to list everything from a database order by a certain field, which i can do, however i almost need to find the position of a entry (WHERE `userID` = '$userID') that would be the criteria, how would i do that? I can do a full DB search and a WHERE criteria search but i can figure out how to do a mix of both.
EDIT: This would be done in PHP if that makes any difference.
08-24-2011, 02:19 AM #2
SELECT list, of, fields FROM tablename WHERE somecondition ORDER BY somefield
There are other parts that can be used, of course:
SELECT FROM WHERE GROUP BY HAVING ORDER BY LIMIT
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.