Right now I'm trying to use PHP to do a binary search on the result
set so I don't have to traverse the entire result set.
I'm using PHP's mysql_data_seek() to move the pointer within the
result set and looking at the data.
What do people think of this approach?
-James
On Mar 22, 2007, at 11:21 AM, James Tu wrote:
> Is there some quick way to do the following in MySQL? (I know I
> can use PHP to search through the result set, but I wanted to see
> if there's a quick way using some sort of query)
>
> Let's say I know that Joe is from Maine.
> I want to do a query of all employees from Maine, ordered by hiring
> date, and figure out where Joe falls in that list. (i.e. which
> record number is he?)
>
> -James
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?
> unsub=jtu@stripped
>
>