PHP获取Mysql插入记录后ID
span style=color:#4e4e4e;font-size:13px;line-height:19px;font-family:Segoe UI, Calibri, Myriad Pro, Myriad, Trebuchet MS, Helvetica, Arial, sans-serif;获取插入数据生成的自增idbr / 参考:/spana href=http://blog.yourtion.com/?p=2
获取插入数据生成的自增id
参考: http://blog.yourtion.com/?p=2318
参考: http://blog.yourtion.com/?p=2318
$query="INSERT INTO `testtable` (`clou1`,`clou2`) VALUES ('testvalue','test')";
mysql_query($query);
$query="SELECT LAST_INSERT_ID()";
$result=mysql_query($query);
$rows=mysql_fetch_row($result);
echo $rows[0];
精彩图集
精彩文章






