รายละเอียดของการตอบ ::
Code (PHP)
มันขึ้นแบบนี้อะครับ เปลี่ยนเป็น mysqli
Warning: mysqli_query() expects at least 2 parameters, 1 given in E:\ProjectWebPHP\htdocs\test\StudentCare\print_out_sum_db.php on line 101
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in E:\ProjectWebPHP\htdocs\test\StudentCare\print_out_sum_db.php on line 102
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in E:\ProjectWebPHP\htdocs\test\StudentCare\print_out_sum_db.php on line 103
$sql = "select tbl_member.member_username,count(tbl_date.date_member) as count_id FROM tbl_member,tbl_date where "
. "tbl_member.member_username = tbl_date.date_member group by tbl_date.date_member";
$q = mysqli_query($sql);
$res = mysqli_fetch_array($q);
while($res = mysqli_fetch_array($q)){
echo $res['date_member']."-".$res['count_id'];
}