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

How to replace search button with link?
hi to everbody.
i have a search submit form and button like this :

<form id="f

To add a field on the screen XK02.
Hi All,

How to add an additional field in the vendor change control screen XK02.
The

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

How can I Compare two xml documents?
Hi all,

I am doing a POC for my project and I am using XE database 10g version.

Help pulling in 'id' with "read more" link
I'm trying to create snippets of my articles in the cms I'm creating, and then have them redirect to

query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:

Code: [Select]$query

Namespace Problem
I'm having problem with a section of code with a variable namespace.

This code works fine:

PHP File Upload Problem
Hi, I have written a very simple file upload script but it fails for reasons I can't explain. Hope

Can you help please? Php file
I have to write this php file to allow users to register their nicknames on nickserv

For an I

Motivational Posters
Hello,

I wonder how can i do them in php. Are there any sample codes that you can show me?

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