What are the methods of querying a field by php
This article will explain in detail the methods of querying a certain field in php, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
1. Query data through "select * from" statement.
2. Read the value in the way of "$student_value ['period'];".
3. You can output the query results by "echo $period;".
Example
Global $mysql;// query $sql = "select * from `bookTable` where student_id ='". $student_id. "'"; $student_value = $mysql- > getLine ($sql); / / read $period = $student_value ['period']; $state = $student_value [' state']; / / output echo $period On the php query method of a field which is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.