PHP Warning: mysqli_fetch_assoc() expects exactly 1 parameter, 3 given in

前端 未结 2 1177
难免孤独
难免孤独 2021-01-15 18:47

I get this error, I tried going through other similar threads but it didn\'t help.

here is php

$host = \"http://www.domain.com\";
$hostname = \"local         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-15 19:34

    From the codes, I see that you want to UPDATE the final records from hits.

    $hitquery =  "SELECT * FROM $userstable where url = '$url'";
    $result = mysqli_query($con, $hitquery);
    while(null !== ($hits= mysqli_fetch_assoc($result))) {
        $query2 = "UPDATE $userstable SET `hits` = hits+1 where url = '$url'";
    }
    

提交回复
热议问题