Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the methods of querying a field by php

Shulou Source: shulou.com Published: 2022-06-03 10:37:47 11月15日 Update

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.

Tags: Queries fields methods content articles methods more knowledge articles output good examples data results statements quality reference help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Xiaomi MariaDB NVidia Linux