Hi, I need to generate 9 digits of unique account numbers. Here is my pseudo code:
function generateAccNo()
generate an account number between 100,000,000 and 999,999,999
if the account number already exists in the DB
call generateAccNo()
else
return new accout number
end if
end function
The function works well, however I'm a little worried about the recursive call.
Will this cause a memory leak (PHP 5 under apache)?
Is this an acceptable way to solve this problem?
Thanks for your input.
Eli s
source
share