Du kan bruge noget som dette:
$query = "SELECT * FROM users WHERE location='UK' AND status='Married'";
$result = mysqli_query($dbc,$query);
while($row = mysqli_fetch_array($result, MYSQLI_BOTH)){
printf("Hello %s! You are from %s and you are %s!\n", $row['first_name'], $row['location'],$row['status']);
}