So here's what I'm trying to do:
while($review=mysql_fetch_array($reviews_set)) {
$query_data="Select * FROM data08 WHERE sub_id=" .$review['sub_id']. " AND login_id=" .$login['id']. " ";
$id_array = array();
$query_data_total=mysql_query($query_data, $connection);
if(mysql_num_rows($query_data_total) == 0){
echo '<img src="images/revcred.gif">';
//how do I kick out of this when/if I find the first one?
$id_array[] = $login['id'];
} else {
echo '<img src="images/revcgreen.gif">';
}
}
This is nested within a couple sql/while loops but the ditty is is that I'm searching to see if someone has submitted a review in data08. If the person hasn't submitted one, ie if(mysql_num_rows($query_data_total) == 0) then I need to grab that persons id and store it in an array.
The problem is that the user may have multiple reviews assigned to him/her so instead of the array constantly writing over itself - how do I kick out of that loop if I find the ($query_data_total) == 0) to be true the first time it runs?
THanks!