MySQL does not have a direct function to produce this, but you may find the RAND() function helpful. Find RAND() on this page:
http://dev.mysql.com/doc/refman/4.1/...functions.html
You could do something like this:
SELECT ROUND(RAND() * 123456789) as id
The larger you make the number, the larger your id. No guarantees about uniqueness of course, but maybe this would serve your purpose?
Here is how I generate unique id's in PHP:
[PHP]
//Generates a 32 character identifier that is extremely difficult to predict.
$id = md5(uniqid(rand(), true));
[/PHP]