Hello
I have the following code: (query added)
$weight_table = mysql_query ("SELECT * FROM ".$prefix."weight ORDER BY wlimit DESC");
foreach ($weight as $area => $weight) {
echo $weight;
while ($weight_row = mysql_fetch_array($weight_table)) {
print_r($weight_row);
$limit = $weight_row['wlimit'];
if ($weight < $limit) {
$weight_level[$count] = $weight_row;
}
}
}
print_r($weight_level);
Where $weight_table is a mysql query result and $weight is an array.
My problem is that $weight_table seems to be expiring after the first while loop, so that the $weight array is effectively treated as having one item. This is a problem!
Can anyone suggest why php would forget a mysql result after the first use?