Em Andamento

3-digit random number generator

Hello,

We need a piece of PHP code to generate random 3-digit numbers as part of the order numbers in our CRE Loaded site.

This should be an easy job. We need somebody code it quickly.

Requirements:

1. The generated random number has to be 3-digit (000-999)

2. There can not be duplicate numbers in the same day period

3. We will create the SQL table on your request

For your reference. Here is the flowchart showing our idea. You don't have to exactly follow it if you have a better idea.

Start

|

Check the date of the

numbers in table

|

| n clear table and

Same day? ------> reset the date

| |

| y |

$abc = rand (0, 999) <---|

| |

| |

Duplicate number y |

found in table? ------>

|

| n

Insert $abc

into table

|

| n

$abc < 100 ? ---------

| |

| y |

Add prefix 0 or 00 |

to make $abc 3-digit |

| <-------------

$ordernum=date("ymd").$abc

|

End

The flowchart is messed up. Attached please find the PDF version.

Habilidades: PHP

Ver mais: digit number generator, digit random number generator, random digit number generator, random digit generator, digit generator, random digit numbers, digit random number, random digit number, php random digit number, digit random number table, digit random numbers, digit code generator, random digits generator, random number table digit, random digit code generator, digit random number php, random number generator digit, random digit generator online, php digit random number, random digit number php, table digit random numbers, random number digits, digit random number generator php, generate digit random number, generate digit random numbers

Acerca do Empregador:
( 11 comentários ) San Francisco, United States

ID do Projeto: #149775

Premiar a:

keyboard999

Hi. I can help you with this project.

$30 USD em 1 dia
(115 Avaliações)
6.5

4 freelancers are bidding on average $31 for this job

eelance

sure can do that .and i think you are not urget for that.

$30 USD in 2 dias
(317 Comentários)
6.7
cyberdog

Hello! I would be very happy to help you on this small project! Thank you!

$30 USD em 1 dia
(6 Comentários)
4.5
tesla007

Hello, work can be done. If you wish, we are able to make a script working for you on our servers, and you will bee able to see fully working script. Also we are able to provide you script using .txt database. Reg Mais

$35 USD em 1 dia
(0 Comentários)
0.0