Insert Records to the database Using PHP and MySQL

 

To add records to the MySQL table the INSERT statement is used 

To add any new records to the table we use INSERT query, which is very simple to understand and work with.

Syntax:

INSERT INTO Table_name (Column1, Column2, Column3, Column4... Column N) VALUES (Value1, Value2, Value3, Value4... Value N)

Example:

INSERT INTO mydata_tbl (Name, Gender, Age, Education) VALUES ('ABCD', 'F', 25, 'MSc')

Here, in the example mydata_tbl is the name of the given table.

Name, Age, Gender,  and Education are the Columns and their values are ABCD, F,25, and MSc respectively.

                                                              

Other Essential MySQL Commands

SELECT - To choose specific data ( record ) from your Database 
CREATE DATABASE - To generate a new Database
ALTER DATABASE - To modify an existing Database



                                                                                                                          HAPPY CODING😍


Comments

Popular posts from this blog

Validation Code For Phone Number Using preg_match() in Php

Writing data to a file using Python

Update and Delete Record Using PHP and MySQL