This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am jamesnine on github. | |
* I am jamesnine (https://keybase.io/jamesnine) on keybase. | |
* I have a public key whose fingerprint is 1AF1 B429 1122 ED58 A043 2A84 BE6F D4E2 EEE5 EDA5 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// next auto increment value | |
$result = mysql_query("SHOW TABLE STATUS LIKE 'tablename'"); | |
$row = mysql_fetch_array($result); | |
return $row['Auto_increment']; | |
// last (highest) id on table | |
$result = mysql_query("SELECT MAX(id) as lastid FROM `tablename`"); | |
$row = mysql_fetch_assoc($result); | |
return $row['lastid']; |