Hey. I was just curious if it's possible to find the row number that a query returns.... What I mean is this: (as an example)
$sql = "SELECT first_name FROM names WHERE first_name = 'Bob' AND some_unique_id = 58 ORDER BY last_name, first_name ASC";
$query = mysql_query($sql);
$name = mysql_result($query, 0, 'first_name');
Ok, now as you know this little snippet would return the row where the guy's first name is Bob and his unique id is 58
However I want to know how many rows it took (if ordered by last_name, first_name ASC) before it found our little friend Bob. For example, if he were the 5th one to be displayed if 'some_unique_id' was not in the WHERE clause, I'd want to know that he was the 5th row.
Basically I'd want him 'ranked'. Is this possible?
Thanks!