I am iterating through a query's result using a WHILE loop. Then, inside of that, I want to iterate through the rows of data from ANOTHER query's results, but as is it will only run that nested WHILE loop once and skip it on the next passings. It looks like this:
while ($row = mysql_fetch_assoc($results)) {
### stuff ###
while ($row2 = mysql_fetch_assoc($results2)) {
### stuff ###
}
### stuff ###
}
Anyone know why after the first iteration through, the nested loop is skipped over?
while ($row = mysql_fetch_assoc($results)) {
### stuff ###
while ($row2 = mysql_fetch_assoc($results2)) {
### stuff ###
}
### stuff ###
}
Anyone know why after the first iteration through, the nested loop is skipped over?