I have this PDO that fetch rows into html table:
<?php
$selectAll = "SELECT * FROM sales WHERE date_now = :date";
$stmtAll=$conn->prepare($selectAll);
$stmtAll->bindValue(':date', date("y-m-d"));
$execAll=$stmtAll->execute();
$result=$stmtAll->fetchAll();
?>
<?php foreach($result as $rows){ ?>
<tr>
<td height="30" align="center"><?php $rows['type'] ?></td>
<td align="center"><?php $rows['provider'] ?></td>
<td align="center"><?php $rows['pay'] ?></td>
<td align="center"><?php $rows['facture'] ?></td>
<td align="center"><?php $rows['type'] ?></td>
<td align="center"><form action='/architect/pages/delete_row.php' method="post">
<input type="hidden" name="rowid" value="" />
<input type="hidden" name="projid" value="" />
<input class="imgClass_dell" type="submit" onclick="return confirm('هل أنت متأكد؟')" name="delete_workers" value="" />
</form></td>
</tr>
<?php } ?>
</table>
This query should select all rows with current date. I have gotten a table with the correct number of rows but with no data (empty table):