Re: random alphanumeric value generator
| From: | Matt Matijevich | Date: | Mon, 26 Jan 2004 23:00:44 +0000 |
| Subject: | Re: random alphanumeric value generator | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-175824@lists.php.net to get a copy of this message | ||
because it is MySQL, couldn't you just use mysql_insert_id
http://www.php.net/manual/en/function.mysql-insert-id.php
instead of
this:
//now get the random number, and MD5 it to get it alphanumeric
$query = 'SELECT MAX(uiIndex), cKey FROM randomKey GROUP BY cKey';
$result = mysql_query($query, dbConnect($errorMsg));
$row = mysql_fetch_object($result);
use this
return md5(mysql_insert_id());