Hi folks,
I would appreciate some help on this, I have a result set which I am trying to work with. The result contains 2 fields and any number of rows.
In calling fetch_row() how can you tell if the method has got to the last row?
I am iterating through the rows using:
while(list($className, $classID) = $result->fetch_row()) {
echo "<tr><td>$className has ID $classID.</td></tr>"
// Here, if the loop is for the last time I need to allow some extra code to run
// echo "<tr><td>Last Item.</td></tr>"
}
I was thinking about having an incremental counter in the while loop which compares the row to num_rows but was thinking that there must be a slicker was of telling if you have reached the last row
Any advice much appreciated. Many Thanks ShaunMc