doupaimo8288
2014-09-16 14:27
浏览 75
已采纳

警告:mysqli_fetch_assoc()期望参数1为mysqli_result,第101行给出null [关闭]

Im not sure why I'm getting this error. Line 101 shows as:

$sql_apr_i="SELECT SUM(total) FROM invoices WHERE YEAR(date_added) = YEAR(CURDATE()) AND MONTH(date_added) = 06 AND estimate = 0 AND user_id = '$user_id'";
$data_apr_i = mysqli_query($connect_db,$sql_apr_i);
$april_invoice = mysqli_fetch_assoc($data_april_i);

What am i doing wrong to get this error?

图片转代码服务由CSDN问答提供 功能建议

我不知道为什么我会收到此错误。 第101行显示为:</ p>

  $ sql_apr_i =“SELECT SUM(总计)FROM发票WHERE YEAR(date_added)= YEAR(CURDATE())AND MONTH(date_added)= 06 AND 估计= 0 AND user_id ='$ user_id'“; 
 $ data_apr_i = mysqli_query($ connect_db,$ sql_apr_i); 
 $ april_invoice = mysqli_fetch_assoc($ data_april_i); 
 </ code> </ pre> 
 \  n 

我错误地得到了这个错误?</ p> </ div>

3条回答 默认 最新

相关推荐 更多相似问题