pdo - Notice: Undefined variable: id in line 9 -
i trying increment id each time query done.. in first code error:
notice: undefined variable: id in line 9
$q->execute(array($id));
the second code increment...
when creating table, add column id, make auto-increment, , make primary key. example:
create table if not exists users ( id int unsigned not null auto_increment, username varchar(50) not null, primary key (id) );
now don't have worry incrementing id in php code. mysql you.
Comments
Post a Comment