note 38656 added to function.mysql-num-rows

From: Date: Thu, 01 Jan 2004 19:08:35 +0000
Subject: note 38656 added to function.mysql-num-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-62755@lists.php.net to get a copy of this message
In addition to getting the row count, you might also want to get the auto_increment number as well: <?php function GetAuto_Increment($tablename) { $sql = "SHOW TABLE STATUS LIKE '$tablename'"; $result = mysql_query($sql); $i=0; while($row = mysql_fetch_assoc($result)) { $a = $row["Auto_increment"]; } mysql_free_result($result); return $a; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.mysql-num-rows.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38656 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38656&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38656&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#62755) next »