你们能帮我处理这段代码吗?我想在我的评论表中计算向下的数量,但我似乎不起作用。
$count_result = mysqli_query($con, 'SELECT COUNT(*) FROM comments WHERE id=$get_id');
Roman try this:
if ($result = mysqli_query($con, "SELECT * FROM comments WHERE id=".mysqli_real_escape_string($con, $get_id))) {
$row_cnt = mysqli_num_rows($result);
printf("Result set has %d rows.\n", $row_cnt);
mysqli_free_result($result);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.