MySQLi Tutorial
MySQL
MySQLi Useful Resources
Selected Reading
- Obtaining & Using MySQLi Metadata
- MySQLi - Handling NULL Values
- MySQLi - Using Joins
- MySQLi - Sorting Results
- MySQLi - Like Clause
- MySQLi - Delete Query
- MySQLi - Update Query
- MySQLi - Where Clause
- MySQLi - Select Query
- MySQLi - Insert Query
- MySQLi - Drop Tables
- MySQLi - Create Tables
- MySQLi - Select Database
- MySQLi - Drop Database
- MySQLi - Create Database
- MySQLi - Connection
- MySQLi - PHP Syntax
- MySQLi - Introduction
- MySQLi - Home
MySQL
- MySQL - Handling Duplicates
- MySQL - Using Sequences
- MySQL - Clone Tables
- MySQL - Temporary Tables
- MySQL - Indexes
- MySQL - Alter Command
- MySQL - Transactions
- MySQL - Regexps
- MySQL - Data Types
- MySQL - Administration
- MySQL - Installation
MySQLi Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
MySQLi - Introduction
MySQLi - Introduction
MySQLi is an extension to MySQL API available in PHP and is introduced from PHP 5.0 onwards. It is also known as MySQL improved extension. Motivation behind MySQLi was to take advantage of new features available in MySQL 4.1.3 onwards. It provides numerous benefits over MySQL extension.
MySQL provides an object oriented interface. It provides both object oriented and procedural approach to handle database operations.
Object Oriented Interface
<?php $mysqp = mysqp_connect("localhost", "user", "password", "database-name"); $result = mysqp_query($mysqp, "SELECT Welcome to MySQLi AS _msg FROM DUAL"); $row = mysqp_fetch_assoc($result); echo $row[ _msg ]; ?>
Procedural Approach
<?php $mysqp = new mysqp("localhost", "user", "password", "database-name"); $result = $mysqp→query("SELECT Welcome to MySQLi AS _msg FROM DUAL"); $row = $result→fetch_assoc(); echo $row[ _msg ]; ?>
MySQLi supports prepared statments.
MySQLi supports multiple statments.
MySQLi supports transactions.
MySQLi provides enhanced debugging capabipties.