This topic is locked
[SOLVED]

 Random Number

9/15/2005 4:12:39 PM
PHPRunner General questions
author

Hi, I saw once how to add random number,like between (300000 and 4000000) in PHPRunner in the forum and i do not see it anymore, can you please put it in the forum again, or if you can find it, please tell me how.

Best Regards.

admin 9/16/2005

Boris,
find the following line in ..._add.php file

$strSQL = "insert into ".AddTableWrappers($strTableName)." ";


and insert the following just before it:

$avalues["`field1`"]=rand();


where field1 is name of the field where you want to insert a random number.

Please note, that field names here are case-sensitive.

501258 9/19/2005

Hi, can I put rand(300000 400000); to have the random number betwen those value?Is the syntax correct?

admin 9/20/2005

Boris,
the correct syntax is

rand(300000,400000);



Sure, you can.