beh allora innanzitutto togli l'auto increment,
poi quando esegui l'inserimento, nella query imposti anche il valore dell'id
Codice PHP:<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db('mydb');
mysql_query("INSERT INTO mytable (id, product) VALUES ( (SELECT MAX(id)+2 FROM mytable), 'kossu')");
?>

Rispondi quotando