In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article uses easy-to-understand examples to introduce how to use the mysqli_query () function in PHP, the content is very detailed, interested friends can refer to, hope to be helpful to you.
First, using PHP coding, I have the following mySQL table:
CREATE TABLE `students` (`ID` int (10) NOT NULL AUTO_INCREMENT, `Name` varchar (255) DEFAULT NULL, `Start` int (10) DEFAULT NULL, `End` int (10) DEFAULT NULL, PRIMARY KEY (`ID`)) ENGINE=InnoDB
Try to use the mysqli_query function in PHP to describe the table.
Code:
$link = mysqli_connect ($DB_HOST, $DB_USER, $DB_PASS, $DATABASE); $result = mysqli_query ($link, "DESCRIBE students")
The document says that for successful SELECT,SHOW,DESCRIBE or EXPLAIN queries, mysqli_query () will return
Mysqli_result object.
But from there I don't know how to print $result to display the query results. If possible, I'd like to print $result to make it look like:
+-+ | Field | Type | Null | Key | Default | Extra | +- +-+ | ID | int (10) | NO | PRI | NULL | auto_increment | | Name | varchar | YES | | NULL | | Start | int (10) | YES | | NULL | | End | int (10) | YES | | NULL | | +-+-+
Another problem I have is how to print the query SHOW CREATE TABLE students.
$result = mysqli_query ($link, "SHOW CREATE TABLE students"); on how to use the mysqli_query () function in PHP to share here, I hope the above content can be helpful to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.