mysqli_query - return values

后端 未结 3 467
南旧
南旧 2021-02-10 03:22

I am using the PHP function mysqli_query to run a SELECT query.

What does mysqli_query return if the query runs successfully, but

3条回答
  •  猫巷女王i
    2021-02-10 03:41

    A Mysqli_query object, than you can use mysqli_num_rows to count the number of rows returned. So:

    if(mysqli_num_rows($query) > 0 ){
        // Do something
    }
    

提交回复
热议问题