我似乎找不到我的困境的答案,我有两个 php 变量
$todaysDate = date('Y-m-d'); //output 2013-07-29
$twoWeeksAgo = date('Y-m-d', strtotime('-2 weeks')); //output 2013-07-15
$dates = mysqli_query($link, "SELECT attend_date FROM $table WHERE attend_date <= '$todaysDate' AND attend_dateORDER BY date ASC"); //Select all dates between today and two weeks ago
当我将它们粘贴到我的查询中时,我得到一个错误并且无法遍历结果。关于如何使这项工作的任何想法?
这是我得到的错误:警告:mysqli_fetch_array() 期望参数 1 是 mysqli_result