$sql="SELECT * FROM stu where id='$id'";
$jg=mysqli_query($mysqli,$sql);
Baidu said that as long as there is no error, it will return true
This is a statement to query the database. I know that $jg is a piece of data. In what form does it exist? I use echo to check the error report, print_r, and var_dump to check only its type. What should I do if I want to check or call the content inside?
The query result of the data table is a resource type. You need to use a special function to convert the result into an array type before it can be used. It can be converted into an index or an association. Determine according to need. If you don’t understand, please refer to the "PHP User Manual"