MySQL has two formats for the insert syntax.
I see the first format is accepted in PHP
But I have grown accustom to the other form of name/value pairs as it is easier to see the connection between column and value.
Can this be done in PHP?
I am new and I am using PHP v5.3.3 with MySQL v5.0
I see the first format is accepted in PHP
Code:
INSERT INTO Persons (FirstName, LastName, Age)
VALUES ('Peter', 'Griffin', '35')
Code:
INSERT INTO Persons SET FirstName='Peter', LastName='Griffin', Age=35)
I am new and I am using PHP v5.3.3 with MySQL v5.0
Comment