$result = mysqli_query ($conn, $sql);) is there an one-time query for $sql?

I am looking at this code on the Internet. May I ask

$result = mysqli_query($conn, $sql);  

has everything here been queried?

or mysqli_fetch_assoc ($result) just look it up one by one?

Php
Apr.09,2021

returns all the data (a result set of), a mysqli_result object, but requires methods such as mysqli_fetch_assoc to read


$result = mysqli_query ($conn, $sql); all the data of the users table is found after execution, mysqli_fetch_assoc ($result);) is to take a row of data from the query result set and move the cursor back one position, so that all the result sets can be traversed.

Menu