I have an SQL query to check status in table. This is my table and record:
#table product#
id_pd id_po status
1 po001 0
2 po001 0
3 po001 0
4 po001 1
how to echo "done";
if all of record have status 1
by id_po ?
<?php
include 'connection.php';
$qry = $db->query("SELECT status FROM product WHERE id_po='$id_po' ");
$fet = $qry->fetch_assoc();
if($fet['status'] == 1){
echo "done";
}
?>
</div>