On 12 February 2010 23:46, Paul Hollingworth wrote:
> Thanks for the code Eric, it seems to loosely provide the functionality that
> I'm after.
>
> Just out of interest though, is there no other way to find the next result
> row in an object apart from dumping it into an array?
>
> Thanks,
> Paul
Hi,
Why don't you just try the following:
$query = "SELECT * FROM foo WHERE UserID = " .$uID . " ORDER BY bar";
$result = mysql_query($query);
//get the first row
$row = mysql_fetch_object($result);
//get the next row
while ($next = mysql_fetch_object($result)) {
//do something with row/next