Perhaps I got my syntax wrong. IF() has been available since 3.23 as
far as I know. I find it more readable than case if I'm only doing a
single test, but either accomplishes what you need.
Here is the documentation for CASE and IF
http://dev.mysql.com/doc/mysql/en/Control_flow_functions.html
On
University ML
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Harald Fuchs
Sent: Thursday, June 03, 2004 10:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Self-Join Query
In article
<[EMAIL PROTECTED]>,
"James KATARSKI" <[EMAIL PROTECTED]> writes:
> I&
In article <[EMAIL PROTECTED]>,
"James KATARSKI" <[EMAIL PROTECTED]> writes:
> I'm trying to generate a report like this: (Which I've done in TWO
> querys, the copied and pasted together)
> +-+--+--+
> | Page Name | Internal | External |
> +-+--+-
You may want to forget all those joins and filters to create two
columns, which is probably making MySQL do multiple full table scans.
It sounds like what you are really looking for is to separate your hits
into 2 columns based on the ip address, and perhaps put a filter on the
hit time or page