Miniman Posted November 20, 2008 Share Posted November 20, 2008 Ok, So i've been trying for a while now and can't get this to work....I need help :| I have the stockmarket, But I don't want it adding by so much each time, I want it to add by random decimal numbers. I've tried stuff like rand (0.001,5.912) But that didn't work and I've set the DB to Decimal 11,3. So is there any way for me to update the stocks in the DB to a random decimal? I need 3 decimal places... If anyone can help, Thank's alot :) Quote Link to comment Share on other sites More sharing options...
Miniman Posted November 23, 2008 Author Share Posted November 23, 2008 Re: Need Help Still need help on this if anyone can help :| ? Quote Link to comment Share on other sites More sharing options...
Miniman Posted November 23, 2008 Author Share Posted November 23, 2008 Re: Need Help Ok, I've tried searching google. That didn't work and I can't get it working still, I really need help lol. Someone help!! :lol: Quote Link to comment Share on other sites More sharing options...
Miniman Posted November 23, 2008 Author Share Posted November 23, 2008 Re: Need Help I've fixed it myself now, So If anyone ever has the same problem I just simply done $rand2= rand(1, 500) / 1000; And that's outputting numbers like 0.212 :) Quote Link to comment Share on other sites More sharing options...
Miniman Posted November 23, 2008 Author Share Posted November 23, 2008 Re: Need Help After everything I was doing to find an answer, I find one and THEN I get a reply, Lol. Thank's anyway for helping :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.