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 […]
Category Archives: mysqli
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 […]
MySQLi – Insert Query To insert data into a MySQL table, you would need to use the SQL INSERT INTO command. You can insert data into the MySQL table by using the mysql> prompt or by using any script like PHP. Syntax Here is a generic SQL syntax of INSERT INTO command to insert data […]