$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.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bf5c-2c2be.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bf5c-2c2be.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?