I have a question. If I wanted to sort randomly on a column weighted by
the value of the column will does this query work
SELECT val_column, val_column*0.1+RAND() as rand_col from TABLE ORDER BY
rand_col limit 10;
This should five me a random row weighted by the value of the column is
this
]
To: [EMAIL PROTECTED]
Sent: Tuesday, 10 June, 2003 14:19
Subject: Hmm looks like this query works
I have a question. If I wanted to sort randomly on a column weighted by
the value of the column will does this query work
SELECT val_column, val_column*0.1+RAND() as rand_col from TABLE ORDER
the same result with 1 row.
---Original Message-
--From: Becoming Digital [mailto:[EMAIL PROTECTED]
--Sent: Tuesday, June 10, 2003 11:33 AM
--To: [EMAIL PROTECTED]
--Subject: Re: Hmm looks like this query works
--
--What's your end goal, and for what do you need/desire a weighted
--random
of sorting the whole table
http://www.mysql.com/doc/en/LIMIT_optimisation.html
-Original Message-
From: Dathan Vance Pattishall [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 11:19 AM
To: [EMAIL PROTECTED]
Subject: Hmm looks like this query works
I have a question. If I
Try this instead...
SELECT val_column, 0.1+RAND() as rand_col from TABLE ORDER BY rand_col limit
10;
Cheers,
A
-Original Message-
From: Eric Wagner [mailto:[EMAIL PROTECTED]
Sent: Tuesday 10 June 2003 21:36
To: Dathan Vance Pattishall; [EMAIL PROTECTED]
Subject: RE: Hmm looks like
To: Dathan Vance Pattishall; [EMAIL PROTECTED]
Subject: RE: Hmm looks like this query works
I think your query will just return the first 10 values in the table sorted
in random order due to how MySQL handles queries that use ORDER BY and
LIMIT:
[from mysql documentation]
If you use LIMIT # with ORDER
I missed the original question but here is my two cents.
The solution has to do with how you define ... used as a online database. Steve
Rapaport is correct if you want to create a database accessable via a browser, but
if you just want a database available on the net all you need (on the
ok
I thought Mysql was a server that could be used as a online database?
If it is, is there some material I have not read that tells me how to do
this?
I understood most of the information I read about Mysql. I was under the
understanding sql is the way to make a online database
Harry
On Thursday 28 March 2002 9:48 am, Harry Rorarius wrote:
I thought Mysql was a server that could be used as a online database?
Yes
If it is, is there some material I have not read that tells me how to do
this?
What are you trying to do? You have not been at all clear in
* Harry Rorarius
I thought Mysql was a server that could be used as a online database?
Yes, it is...
If it is, is there some material I have not read that tells me how to do
this?
Probably :o)
I understood most of the information I read about Mysql. I was under the
understanding sql is
By the way you're using the terms, I would guess you're hoping
to make a new database, and place it on the web.
In that case, Mysql is probably at too low a level of
detail for your needs. To solve your problem you
would need to learn:
HTML
CGI
middleware (ASP, PHP, etc)
MySQL
SQL
database
11 matches
Mail list logo