otmail.com> cc:
Fax to:
L PROTECTED]
To: "shaun thornburgh" <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: A Complicated Group Query
Date: Tue, 22 Jun 2004 14:32:14 -0400
OOPS! That's because my second query should have been a LEFT JOIN and not a
RIGHT JOIN (I hate making silly cut-and-paste error
Fax to:
s!
I hope you can help me here, many thanks!
From: [EMAIL PROTECTED]
To: "shaun thornburgh" <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: A Complicated Group Query
Date: Tue, 22 Jun 2004 10:12:22 -0400
Hi Shaun,
You said:
>SELECT COUNT(B.Booking_ID), U.User_Location
Fax to:
06/22/2004 09:41 Subject: A Complic
Hi,
I have three tables (among others!) in my database; Bookings, Users and
Projects. Users have location codes and can make bookings which are for a
particular project.
Using the following query I can get a list of all Locations (Each user has a
Location code) and the number of Bookings that h
<[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: Group Query
Date: Tue, 22 Jun 2004 10:56:12 +0200
Shaun,
when you add "WHERE B.Project_ID > = '10'" you, in a way,
change your LEFT JOIN to an INNER JOIN.
You need to do it like:
LEFT OUTER JOI
P
BY(U.User_Location);
Any ideas, do I need to do a double join, or do I need to join the
projects table also?
Thanks for your help
From: "Paul McNeil" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: RE: Group Query
Date: Fri, 18 Jun 2004 08:20:10 -0400
You can use a Left
ct_ID = '8' GROUP
BY(U.User_Location);
Any ideas, do I need to do a double join, or do I need to join the projects
table also?
Thanks for your help
From: "Paul McNeil" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: RE: Group Query
Date: Fri, 18 Jun 2004 08
UP BY(U.User_Location);
God Bless
Paul C. McNeil
Developer in Java, MS-SQL, MySQL, and web technologies.
GOD BLESS AMERICA!
To God Be The Glory!
-Original Message-
From: shaun thornburgh [mailto:[EMAIL PROTECTED]
Sent: Friday, June 18, 2004 7:54 AM
To: [EMAIL PROTECTED]
Subject:
Hi,
you can use:
SELECT COUNT(B.Booking_ID), User_Location
FROM Users U
LEFT JOIN Bookings B ON U.User_ID = B.User_ID
GROUP BY(U.User_Location);
/Johan
shaun thornburgh wrote:
Hi,
The following table produces a query that shows all bookings that user
has made and groups the number of bookings by t
Hi,
The following table produces a query that shows all bookings that user has
made and groups the number of bookings by the users location code.
mysql> SELECT COUNT(B.Booking_ID), User_Location FROM Bookings B, Users U
WHERE U.User_ID = B.User_ID GROUP BY(U.User_Location);
At the momnet if no
Yes,
You can use the FIELD() function:
SELECT * FROM table WHERE recordID IN ($string)
ORDER BY FIELD(recordID,$string)
On Tue, 2003-02-04 at 13:15, Wilbert Enserink wrote:
> Hi All,
>
> I have a string containing recordID's in a specific order (e.g.
> $string=17,2,33,5,99)
> How can I select
* Wilbert Enserink
> I have a string containing recordID's in a specific order (e.g.
> $string=17,2,33,5,99)
> How can I select those records from a table in the right order (as
> determined in $string)?
>
> SELECT * FROM table WHERE recordID IN ($string)
>
> results in the right records but not
Hi All,
I have a string containing recordID's in a specific order (e.g.
$string=17,2,33,5,99)
How can I select those records from a table in the right order (as
determined in $string)?
SELECT * FROM table WHERE recordID IN ($string)
results in the right records but not in the order I want, ins
15 matches
Mail list logo