Connect to a mySQL database (MySQLi OO)
The following is the code to connect to a database using MySQLi Object-Oriented.
The following is the code to connect to a database using MySQLi Object-Oriented.
In command prompt, change the folder to mysql folder in XAMPP. Enter the following code for connect to your database. Note the code below assumes there is no password for the root user (localhost).
MySQL: Documentation, Create Index Statement
Aliases make writing queries easier when dealing with multiple tables. It even makes it easier when accessing queries from scripting languages (e.g. PHP). Below is an example: