Echo autoincrement id doubt
- by Marcelo
Hi, can I print the id, even if it's autoincrement ? Because the way I'm doing I'm using an empty variable for id.
$id= "";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die ("Não conectou com a base $database");
mysql_query("INSERT INTO table1(id,...)
VALUES ('".$id."',....)")
or die(mysql_error());
…