First, I'll answer the question, and then I have a few comments on the code.
To answer, no, the array starts at 0. So it should be $runcount = 0;, and while ($runcount < $rownum). That will give you the results you want. However:
(1) You don't want to do that in a while loop. You should say,
for ($runcount = 0; $runcount < $rownum; $runcount++) {
//code
}
Why? You forget an leave out the $runcount++ IN the codeblock, and you've got a runaway process for max_execution_time. Also, the for loop is more readable.
Which leads me to point #2: why do a mysql_data_seek when you're just iterating through?
$result = mysql_query("SELECT * FROM db", $connection);
while ($row = mysql_fetch_array($result)) {
// do your compare here
}
That's it. With that, you iterate through all results, end of story.
Of course, both those points aside, Lars is right -- don't compare in php when the SQL server can do the comparison. It caches many things to speed up the comparison (which is probably faster even in the base case than the compare in PHP), and doing it the way you've written it requires returning all that data from the SQL server, even though only 1 row is relevent (if that).
Anyhow, hope that helps.