I have this mysql table.
name | total
chris | 5
jan | 3
bob | 2
eric | 4
chris and jan were selected using this code
$query = " select * from table where name = '$given_name' ";
// &given_name = result from another query
I want to store the result of the query to a variable.
while($row=mysql_fetch_assoc($query)){
$result = $row['name'];
} // i want to store both chris and jan to $result
Then i will use the result of the query to another query. I want to select the remaining names. Not the ones on the first query. I want chris and jan not to be selected with this query because it is stored in $result
select * from table where name != $result ;
But one name was just stored in $result. I want them both to be stored in $result.