If you truly want random, high value numbers, I recommend creating a function. For example:
$order_id = null;
while( $order_id === null )
{
$id = rand( 1, 9999999 );
if ( !$dupe = $dbh->getOne("SELECT `order_id` FROM `orders` WHERE `order_id` = {$id} LIMIT 1") )
{
$order_id = $id;
}
}
Sorry for the DB class, habits never die, you'll have to modify that on your own.
Also, do not forget to set your SQL field to ZEROFILL if you want to be sure that all IDs are the same length. IE: '000701129' instead of '701129'