note 38656 deleted from function.mysql-num-rows by nlopess

From: Date: Fri, 02 Jan 2004 11:35:23 +0000
Subject: note 38656 deleted from function.mysql-num-rows by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62772@lists.php.net to get a copy of this message
Note Submitter: seanw ---- 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; } ?>

« previous php.notes (#62772) next »