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?

Did you know?Explore Trending and Topic pages for more stories like 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

php/mysql problem
Hey all,

Problem: im trying to setup a shop where people can use a drop-down list to select t

About imagecopyresampled()
Hello,

I am looking to use this function to resize parts of an image to a fixed thumbnail siz

how to make database item unique
Hey guys,

is it possible to do this:

I have the database item $title being pulled for

Why will this program not run if the variables are not global?
Hey guys I have a kind of perplexing situation that is probably simple, but I can't seem to understa

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

search query in mysql in php problem
my search query wont work, i know, that my codes are correct.please help

Code: [Select]&l

Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called d

Is there something wrong?
Hi all,

Just a quick question... can someone look at this code and see if something is wrong?

please help
HTML Code:

Code: <span id="ctl00"><span>

Linux socket programming
Where can I find a good introduction to socket programming?

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