Note: In a do...while loop the condition is tested AFTER executing the statements within the loop. 1. This means that the do...while loop will execute its statements at least … An important thing to note is that using mysql_fetch_assoc() is not significantly slower than using mysql_fetch_row(), while it provides a significant added value. Okay, here is complete code: