mysqli 下一个 Auto_increment ID 怎么获取

WBOY
Release: 2016-06-23 13:22:49
Original
977 people have browsed it

注意是mysqli,不是mysql

现在用这样种都不行:

		$query="show table status like '{$tpre}{$table}'";	$sql=$xingao->query($query);	$id= mysqli_result($sql, 0, 'Auto_increment');//下一条ID		$query="show table status like '{$tpre}{$table}'";	$sql=$xingao->query($query);	$id= mysql_result($sql, 0, 'Auto_increment');//下一条ID
Copy after login


回复讨论(解决方案)

我是小白,我只知道先insert进去一条数据,然后再根据插入的数据select出来它的自增id

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template