MySQLi Module - Accessing MySQL Server

This chapter provides tutorial examples and notes about MySQLi module for MySQL server. Topics include configuring the PHP environment to use the MySQLi module; opening connection to MySQL server; running SQL queries; looping through result set.

MySQLi Module and Configuration

mysqli-hello.php - Test MySQLi Module

mysqli_connect() - Open MySQL Connection

mysqli_query() - Run SQL Queries

mysqli_affected_rows() - Count Affected Rows

mysqli_insert_id() - ID from AUTO_INCREMENT

mysqli_fetch_array() - Fetch Row from Query Result

mysqli_fetch_fields() - Fetch Field Information

Escape Escape Characters - \\\\ for \\

Summary of Basic MySQLi Functions

MySQLi Object-Oriented Programming

Takeaways:

Table of Contents

 About This Book

 Introduction and Installation of PHP

 Managing PHP Environment and Modules on macOS

 Managing PHP Environment and Modules on CentOS

 Configuration and Modules

 cURL Module - Client for URL

 DOM Module - Parsing HTML Documents

 GD Module - Manipulating Images and Pictures

MySQLi Module - Accessing MySQL Server

 OpenSSL Module - Cryptography and SSL/TLS Toolkit

 PCRE Module - Perl Compatible Regular Expressions

 SOAP Module - Creating and Calling Web Services

 SOAP Module - Server Functions and Examples

 Zip Module - Managing ZIP Archive Files

 References

 Index

 Full Version in PDF/EPUB