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...

http://pastebin.com/g83uym8e

http://pastebin.com/axfkwnyd

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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -