MySQLi – Select Database Once you get connected with the MySQL server, it is required to select a database to work with. This is because there might be more than one database available with the MySQL Server. Selecting MySQL Database from the Command Prompt It is very simple to select a database from the mysql> […]
Category Archives: mysqli
MySQLi – Connection MySQL Connection Using MySQL Binary You can establish the MySQL database using the mysql binary at the command prompt. Example Here is a simple example to connect to the MySQL server from the command prompt − [root@host]# mysql -u root -p Enter password:****** This will give you the mysqli command prompt where […]
MySQLi – Create Table To begin with, the table creation command requires the following details − Name of the table Name of the fields Definitions for each field Syntax Here is a generic SQL syntax to create a MySQL table − CREATE TABLE table_name (column_name column_type); Now, we will create the following table in the […]