Rand() help needed


Posted on 16th Feb 2014 07:03 pm by admin

Hi all,

Can someone explain and give me a quick example of how I would go about this?

I have 100 values in a database with colum headings of t_val and t_name. If I wanted to update all 100 of these with a rand number how would I do this?

Would I do something like this?
Code: [Select]t_val1 = rand(1,10);

What I want to do is have different variances in the rand as well. So ten would be rand(1,10) and the next ten would be rand(5,20) for example?

Many Thanks

No comments posted yet

Your Answer:

Login to answer
150 Like 44 Dislike
Previous forums Next forums
Other forums

Blocking video streaming
Hello everyone,

I post a message here because i didn't find any solution yet.
I just finis

Question about ShowWindow()
Hello....

I'm struggling with sumpin, and I hope y'all can help.

I've got a CFormView

What is SAP Avatar ?
Hi All,

This G.Satish , my boss asked me to explore on SAP Avatar. I searced in internet

Date/Time and Checkbox
Hi Everyone,

I am trying to figure out how to insert the current date and tim

Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th

Add a sign-up feature to a flat file login script
I'm working on a flat file login script and I would like to add a sign-up feature to it with a email

PHP Blog help
Need help with posting comments in a word press blog? I have a comments page where the comments are

PayPal Redirect Issue
When I have my paypal button set so that is redirects to http://empiremarketing.ca/order.php,it work

Need help with unexpected T-STRING error
I'm a newbie and I'm still learning PHP. However this error has me stumped. I've googled, searched t

Return X values where an ID number doesnt matter
Well as for subject heading, thats the best i could think of.

Currently im having a problem w

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash