I have a while loop that a query is in and the MySQL query works just fine. However when I try to output my text saying that the query is successful I get:
"Table Succesfully UpdatedTable Succesfully UpdatedTable Succesfully Updated"
I know this I happening becuase I am editing 3 objects, so I'm wondering is there a way to output the string without having it repeat however many objects I change?
Here is the loop:
while ($r3 = mysql_fetch_assoc($result3))
{
$part_num = $r3['part_num'];
$desc = $r3['desc'];
$bom_qty = $r3['qty'];
$need_qty = $qty * $bom_qty;
//insert the part_num into the temp parts table and the qty
$resut4 = mysql_query("INSERT INTO `temp_grabtec_parts`(`temp_id`,`part_num`,`desc`,`qty`) VALUES ('$temp_id','$part_num','$desc','$need_qty')");
if ($resut4) {
echo 'Table Succesfully Updated';
} else {
echo mysql_error();
}
}