i have a table messages whose columns are
id(primary key,auto increment) from to sub body
now when i am trying to insert in the table with the following syntax
insert into messages values(2,'$from','$to','$sub','$body')
it is working fine.
but since the id is in auto increment mode i am using the following syntax
insert into messages(from,to,subject,body) values('$from','$to','$sub','$body')
i am getting an error that there is a sql syntax error plz chek the manual for correct syntax.
can u help me in solving this