I have the following query:
select *,
if( season_week_date = 2006-08-16, on, off ) as stat,
sum(overall_points) as total_points
from rosters r
left join celebs c
on c.celeb_id = r.celeb_id
where
season_id=5062
and user_id=1
group by r.celeb_id
order by overall_rank, ln, fn;
It almost works
Hello,
I realize that this is a silly question, but I cannot figure it out. I
don't know why. Id really appreciate your help.
I cannot get mysql to do general logging. My my.ini reads like this:
--
#This File was made using the WinMySQLAdmin 1.4 Tool
Geoffrey,
Do I really need that subquery?
You need its scalar result just once, so why not ...
SELECT url, @maxcount:=COUNT(1)
FROM bi_bookmarks
WHERE date NOW() - INTERVAL 86400 SECOND
GROUP BY url
ORDER BY count DESC LIMIT 0, 1;
SELECT
title,
url,
COUNT(1) AS count,
CEIL(COUNT(1) /
hello.
i want to connect to mysql from c++ .
i examine any version or platform.
i use mysql5 and 4 in suse10 with gcc.then examine mingw and mysql5 and 4
and 3 for severeal times but i can't solve this problem.when i want to compile
examples of mysql++ following error appeared:
Hi,
I have one table with images (image_id, name, filename, vote_count) and one
table with votes (vote_id, image_id, vote_value, user_id).
I want to find the image with the lowest vote_count that a known user has
not yet voted.
For MySQL 4.0 I have the following:
SELECT i.* FROM images i LEFT
I am in a situation where I have say 1 column called attribute I need and
the result set is 3 rows. i.e.
ROW 1 - Mechanic
ROW 2 - Carpenter
ROW 3 - Plumber
I want to have the rows returned as one row
Such as
ROW 1 Mechanic, Carpenter, Plumber
Something like a literal join would be beautiful such
On Sun, 2006-08-13 at 15:53 -0700, Steffan A. Cline wrote:
I am in a situation where I have say 1 column called attribute I need and
the result set is 3 rows. i.e.
ROW 1 - Mechanic
ROW 2 - Carpenter
ROW 3 - Plumber
I want to have the rows returned as one row
Such as
ROW 1 Mechanic,
so if i have a list of records...
id name other
1 water H2O
2 water aqua
3 water liquid
so i want to select other where name = 'water'
but i want to only return 1 result, and for that result to be a random
value. is there a way to sort by rand() ? or something similar? or am i
better of
Tanner Postert wrote:
so if i have a list of records...
id name other
1 water H2O
2 water aqua
3 water liquid
so i want to select other where name = 'water'
but i want to only return 1 result, and for that result to be a random
value. is there a way to sort by rand() ?
Yes.
Funnily
Dave Shariff Yadallee - System Administrator a.k.a. The Root of the
Problem wrote:
I use SELECT all from * ... and one row is a gif.
How do I get that gif to appear as a gif and not text?
In your connecting programming language.
Mysql doesn't know or care whether it's a gif, pdf, word doc or
Jieqi Wang wrote:
I am using WinXP, GNU Emacs 23, MySQL 5.
When I start a mysql process with `sql-mysql' in emacs, no output is
displayed in the buffer until I quit or kill the process.
After I add the following line into the initialization file of emacs,
(setq sql-mysql-options '(-C -t
MYSQL wrote:
Hi,
I recently updated to version 4.1.2 from a slightly older one like
4.1.11 or something. But I am now having a problem.
Before,this query would work fine:
Select distinctrow * from mytable order by mydatecolumn.
mydatecolumn is a column of type date.
This used to return
Hi,
Would something like this make it so that every time there was a new row
inserted on TEST, a row with the new values was inserted on LOG_TABLE? I
am not sure if you can reference NEW.id and all the NEW values directly
and send them in a trigger... Thanks...
CREATE TRIGGER test.data_table_au
Dear MySQL-ers,
Using MySQL 4.1.20, I'm trying to do a complex query on a subset; well,
complex to me, that is. :)
In Perl, I'm trying to get 4 random entries from a subset WHERE processed
= '1' and columnId is unique. Like so:
$sth = $dbh-prepare (SELECT columnId FROM queue WHERE columnId =
Mark wrote:
Dear MySQL-ers,
Using MySQL 4.1.20, I'm trying to do a complex query on a subset; well,
complex to me, that is. :)
In Perl, I'm trying to get 4 random entries from a subset WHERE processed
= '1' and columnId is unique. Like so:
$sth = $dbh-prepare (SELECT columnId FROM queue WHERE
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: maandag 14 augustus 2006 3:55
To: Mark
Cc: mysql@lists.mysql.com
Subject: Re: Random SELECT on subset
In Perl, I'm trying to get 4 random entries from a subset
WHERE processed
= '1' and columnId is unique.
Mark wrote:
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: maandag 14 augustus 2006 3:55
To: Mark
Cc: mysql@lists.mysql.com
Subject: Re: Random SELECT on subset
In Perl, I'm trying to get 4 random entries from a subset
WHERE processed
= '1' and columnId is unique.
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: maandag 14 augustus 2006 4:18
To: Mark
Cc: mysql@lists.mysql.com
Subject: Re: Random SELECT on subset
Then I want to select 4 random columnIDs, but only from the
subset WHERE processed = '1' (so, from the group
Chris W wrote:
By default MySQL uses port 3306 so you need to be sure that port is open
on the server, and not blocked by a firewall. You also need to be sure
the user you are trying to login as can login remotely. In the MySQL
user data base, there is a column for host which is the host
Steffan A. Cline wrote:
I have the following query:
select *,
if( season_week_date = 2006-08-16, on, off ) as stat,
sum(overall_points) as total_points
from rosters r
left join celebs c
on c.celeb_id = r.celeb_id
where
season_id=5062
and user_id=1
group by r.celeb_id
order by
ali asghar torabi parizy wrote:
hello.
i want to connect to mysql from c++ .
i examine any version or platform.
i use mysql5 and 4 in suse10 with gcc.then examine mingw and mysql5 and 4
and 3 for severeal times but i can't solve this problem.when i want to compile
examples of mysql++
André Hänsel wrote:
Hi,
I have one table with images (image_id, name, filename, vote_count) and one
table with votes (vote_id, image_id, vote_value, user_id).
I want to find the image with the lowest vote_count that a known user has
not yet voted.
For MySQL 4.0 I have the following:
SELECT
Mark wrote:
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: maandag 14 augustus 2006 4:18
To: Mark
Cc: mysql@lists.mysql.com
Subject: Re: Random SELECT on subset
Then I want to select 4 random columnIDs, but only from the
subset WHERE processed = '1' (so, from the
On Mon, Aug 14, 2006 at 10:42:50AM +1000, Chris wrote:
Dave Shariff Yadallee - System Administrator a.k.a. The Root of the
Problem wrote:
I use SELECT all from * ... and one row is a gif.
How do I get that gif to appear as a gif and not text?
In your connecting programming language.
Hi,
i got a table datavalue as follows
code period value
c1 20051
c2 20052
c32006 3
c4
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: maandag 14 augustus 2006 4:54
To: Mark
Cc: mysql@lists.mysql.com
Subject: Re: Random SELECT on subset
Hmm, this still does not do what I want:
SELECT columnId FROM queue WHERE processed = '1' ORDER BY RAND() LIMIT 4
VenuGopal Papasani wrote:
Hi,
i got a table datavalue as follows
code period value
c1 20051
c2 20052
c32006 3
Dave Shariff Yadallee - System Administrator a.k.a. The Root of the
Problem wrote:
On Mon, Aug 14, 2006 at 10:42:50AM +1000, Chris wrote:
Dave Shariff Yadallee - System Administrator a.k.a. The Root of the
Problem wrote:
I use SELECT all from * ... and one row is a gif.
How do I get that gif
Mark wrote:
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: maandag 14 augustus 2006 4:54
To: Mark
Cc: mysql@lists.mysql.com
Subject: Re: Random SELECT on subset
Hmm, this still does not do what I want:
SELECT columnId FROM queue WHERE processed = '1' ORDER BY RAND()
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: maandag 14 augustus 2006 6:32
To: Mark
Cc: mysql@lists.mysql.com
Subject: Re: Random SELECT on subset
Thanks to you, the query has been greatly simplified, but
the result is still the same: every once in a while
Mark wrote:
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: maandag 14 augustus 2006 6:32
To: Mark
Cc: mysql@lists.mysql.com
Subject: Re: Random SELECT on subset
Thanks to you, the query has been greatly simplified, but
the result is still the same: every once in a
Once again i send the table data:
Code Period Value
c1 2004 22
c1 2005 10
c2 2005 15
c3 2005 20
c4 2005 15
c5 2005 5
c6 2005 30
c7 2005
SELECT SUM(IF(code='c1', code, IF(code='c2', code, 0))) - SUM(IF(code='c4',
code, IF(code='c5', code, 0))) FROM datavalue;
-Original Message-
From: VenuGopal Papasani [mailto:[EMAIL PROTECTED]
Sent: Monday, August 14, 2006 11:26 AM
To: mysql@lists.mysql.com
Subject: query needed
Hi,
i
33 matches
Mail list logo