0
$sql2 = mysql_query("select MAX(column1) FROM sampledb");
while($iii=mysql_fetch_row($sql2))
{
$iii['MAX(column1)'];
}
$numplus = $iii+1;
echo"$numplus";
我是個新手,請幫我T_T獲取,增加了最大數量
$sql2 = mysql_query("select MAX(column1) FROM sampledb");
while($iii=mysql_fetch_row($sql2))
{
$iii['MAX(column1)'];
}
$numplus = $iii+1;
echo"$numplus";
我是個新手,請幫我T_T獲取,增加了最大數量
什麼你正在尋找在這裏是the AUTO_INCREMENT
column attribute,它指示MySQL自動使用下一個可用值主鍵。
是啊,但數字格式爲000001 –
@RobertJohnConcepcion http://stackoverflow.com/questions/611340/how-can-i-set-autoincrement-format-to-0001-in-mysql –
@Robert約翰·康塞普西翁:不要混合數據和它的演示文稿 – zerkms