Unstoppable Domains

PHP - Random number selector

Spaceship Spaceship
Watch

SiKing

Registered MemberEstablished Member
Impact
6
Ello. I am offering 50 NP$ to anyone who can give me a PHP/MySQL script which will:

- Select the data from a MySQL database
- Take the numbers from the 'x' row
- and then display a random name from the table according to probability of the 'x'.

Sorry, I know that isn't too clear. Basically, there is a table with rows 'x' and 'name'. If one entry (Jim) in the database has '50' in the 'x' row , and another (Paul) has '1'. The script is 50 times more likely to display 'Jim's' results.

Sorry, I know that isn't too clear. very tired
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
0
•••
Thanks. However, I was looking for a MYSQL script rather than MSSQL.

I am developing something myself instead, and I just need to know how I can find all of the 'id's in a table. (For example, if I delete a row). I could use mysql_numrows, but it may include id's which do not exist. For example, it will select id's 1-50, but I may have deleted row #40.
 
0
•••
The script is 50 times more likely to display 'Jim's' results.

does that mean that ur table is a frequency table? or is the number just an id?
 
0
•••
The number is just an id
 
0
•••
Can you clarify what you are looking for so I can help?
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back