Mysql and PHP.
Say I have a complex select statement that grabs a good 100 or so records.
Now, one of those records I know the ID of, but want to pull what row number it is at.
Like for instance the ID of 635252 is row 26 out of 103 records that would be returned from a complex WHERE claus.
Am I smoking crack?
Is finding this number easy to get through mysql, or do I just do the full query, run a while loop with a counter, and when I come to the row with the ID i am trying to find, then I just break out and use that number? Thats the rude crude blunt way, but I would rather know of a built in mysql method for pulling that id out without having to go retrieve rows of data to find out in php.
?
Thanks for input.