divinemr
asked on
Function/proceedure to Generate mysql number between 2 ranges
For example,
select gennum(0,1);
returns either 0,1
This is to be used as follows:
select spaces(gennum(0,1));
Obviously the result has to be in whole numbers as the spaces function will only accept whole numbers.
select gennum(0,1);
returns either 0,1
This is to be used as follows:
select spaces(gennum(0,1));
Obviously the result has to be in whole numbers as the spaces function will only accept whole numbers.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nevermind, I got it .. thanks
You're welcome.
ASKER
select spaces(0,3) # Generates either no spaces, 1, 2 or 3 spaces