显示sql记录,其中日期是未来的php

时间:2013-12-01 16:46:01

标签: php mysql

我正在尝试创建一个SQL查询,该查询将显示网页上即将到来的教练之旅。我希望该页面可以删除已经发生的任何旅行。到目前为止,这是我的代码。但我在尝试时收到此错误,错误消息:

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given 
in /homepages/3/d383808630/htdocs/php/checker/show.php on line 67

这是代码,请帮忙!

$result = mysqli_query($con,"SELECT * FROM checker WHERE date  > GETDATE()");

while($row = mysqli_fetch_assoc($result))
  {
  echo 
  "<div class='destpic'>" . $row['id'] ."</div>" . 
 "<div class='topinfo'><p class='topinfo'><span class='topinfo'>" .
  $row['date'] . "</span><br /><span class='topinfo'>" . 
  $row['displayer'] . "</span><br /><span class='topinfo'> " . 
  $row['forum'] . "</span><br /><span class='topinfo'> ";
  }
mysqli_close($con);
?> 

0 个答案:

没有答案