我试图显示created_at
日期介于 2 个日期之间的行数。
这是我的代码:
$result=mysql_query("select * from payments
where created_at between '2013/10/01 00:00:00' and '2013/10/30 00:00:00'")
or die('You need to add an administrator ' );
$counter = mysql_query("select * from payments
where created_at between '2013/10/01 00:00:00' and '2013/10/30 00:00:00'");
$row = mysql_fetch_array($result);
$id = $row['id'];
$num = mysql_fetch_array($counter);
$countjan = $num["id"];
然而,当我回声
<?php echo"$jan";?>
这显示0
了我如何让它工作的任何想法
Ps 此日期范围内有 1 行