Thread INSERT Statement per mysql_query: auto_increment ID (7 answers)
Opened by vayu at 2005-08-12 17:34

GwenDragon
 2005-08-12 20:56
#10231 #10231
User since
2005-01-17
14538 Artikel
Admin1
[Homepage]
user image
Beispiel [php]
<?php
mysql_connect("localhost", "mysql_user", "mysql_password") or
die("Could not connect: " . mysql_error());
mysql_select_db("mydb");

mysql_query("INSERT INTO mytable (product) values ('kossu')");
printf ("Last inserted record has id %d\n", mysql_insert_id());
?>
[/php]
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread INSERT Statement per mysql_query: auto_increment ID