- SQL code
mysql> desc fb64_key; +-------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+----------------+ | fbid | int(11) | NO | PRI | NULL | auto_increment | | fbkey | varchar(16) | NO | | NULL | | +-------+-------------+------+-----+---------+----------------+ 2 rows in set (0.00 sec)
fbid是自动分配ID的。。
- SQL code
INSERT INTO `webgame`.`fb64_key` ( `fbid` , `fbkey` ) VALUES ( NULL , '222' );
我是用PHP怎么知道它分配的ID号是多少呢??谢谢
------解决方案--------------------
mysql_insert_id()