<?php
$results = mysqli_query($connecDB,"SELECT COUNT(*) FROM paginate WHERE IDmen='$name11'");
$get_total_rows = mysqli_fetch_array($results); //total records
//break total records into pages
$total_pages = ceil($get_total_rows[0]/$item_per_page);
?>
我收到此错误:
mysqli_query()要求参数1为mysqli,在第4行的/home//public_html/load-more-men.php中给出null mysqli_fetch_array()要求参数1为mysqli_result,在第5行的/home//public_html/load-more-men.php中给出null 在第8行的/home//public_html/load-more-men.php中除以零
答案 0 :(得分:0)
<?php
$connecDB = mysqli_connect("localhost","my_user","my_password","my_db");
$results = mysqli_query($connecDB,"SELECT COUNT(*) FROM paginate WHERE IDmen='$name11'");
$get_total_rows = mysqli_fetch_array($results); //total records
//break total records into pages
$total_pages = ceil($get_total_rows[0]/$item_per_page);
?>