PHP/SQL column problems?

Tony

New member
Hi guys,

currently I have $query=
"INSERT INTO cms_access_levels (access_level, access_name)

VALUES ('1', 'user')";

as my code....

however, I want to add additional values in the VALUES bracket, however whenever I do so, I get an error.

Basically, the number of columns is to remain the same....I just want to be able to add '2', 'Moderator' and '3', 'Adminstrator' to my code.

can anyone tell me how please?
 
A third option is to do it like this.

INSERT INTO cms_access_levels (access_level, access_name)
VALUES (2,'Moderator'), (3,'Administrator'), (99,'Ultimate Access');


where you can specify multiple value sets and so on.
 
Back
Top