problem inserting data into table
Posted: Sat Oct 05, 2013 6:06 pm
Hi,
How do I insert data to a table where the third column is autoincreaseing? Like
*age*nr*id*name*surname * time
Where id is autoincreasing.
If I just set age and nr the db is inserting age nr and id but as soon as I try to insert after if it doesn't work? What am I missing?
Thanks
How do I insert data to a table where the third column is autoincreaseing? Like
*age*nr*id*name*surname * time
Where id is autoincreasing.
Code: Select all
IF($stmt=$mysqli->prepare("INSERT INTO user (age, nr, name, surname, time) VALUES (?, ?, ?, ?, ?)" )) {
$stmt->bind_param('iisss' $age, $nr, $name, $lname, $time);
$stmt->execute();
}
Thanks