我试图在日期之间进行选择,例如在 04/05/20 和 04/07/20 之间,但问题是它只显示在 04/06/20 到 04/07/20 之间,第一天不包括在内,任何人都可以帮我?这是下面的代码:include('../connect.php');$d1=$_GET['d1'];$d2=$_GET['d2']; $result = $db->prepare("SELECT * FROM sales WHERE date <= :a and date >= :b ORDER by transaction_id DESC ");$result->bindParam(':a', $d2);$result->bindParam(':b', $d1);$result->execute();for($i=0; $row = $result->fetch(); $i++)
添加回答
举报
0/150
提交
取消