Say I run the following
$sql1 = "select distinct(application_id) from application_results";
$sql1_result = mysql_query($sql1, $db) or die(mysql_error());
if ($_POST['Delete'] == "Delete") {
while ($row_delete = mysql_fetch_array($sql1_result)) {
$id = $row_delete['application_id'];
if ($_POST[$id]=='1') {
echo "Delete " . $id;
}
}
}
and then later in the page I want to use $sql1_result again like this
while ($row = mysql_fetch_array($sql1_result)) {
echo $row['application_id'];
}
How can I do it with out running the query twice?
Thanks for the help.
jasonn.