I have three tables in a survey system (that I didn't design)
surveys (the instance of a user taking a survey) with survey_id and show_id
(each survey is in response to a particular show)
responses (possible responses to questions) with response_id
response_map ( survey_id, response_id )
Is this possible? Is it possible to have three queries in a UNION? Sorry
about the PHP in there. I just wanted to know if this is allowed? If
only the 1st two queries it works OK, add the 3rd and it breaks. How can
I accomplish this? Thanks. Lee G. I'm using 4.1.3beta
$result =
- Original Message -
From: leegold [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 22, 2004 11:14 PM
Subject: Union query help
Is this possible? Is it possible to have three queries in a UNION? Sorry
about the PHP in there. I just wanted to know if this is allowed? If
only
Thanks Jeremy,
That was easy.
- Ed
Jeremy March [EMAIL PROTECTED] 3/12/04 7:42:12 PM
Can anyone tell me how to sort the combined results of a Union
query?
(Select Name From Employee Group By Name Order By Name)
Union (Select Name From Consultant Group By Name Order By Name);
Just
Can anyone tell me how to sort the combined results of a Union
query?
(Select Name From Employee Group By Name Order By Name)
Union (Select Name From Consultant Group By Name Order By Name);
Just add another order by on the end after the parenthesis:
(Select Name From Employee Group By Name Order
Ed Reed [EMAIL PROTECTED] wrote:
Can anyone tell me how to sort the combined results of a Union query?
Right now I have a Group By and Order By in both of my queries that make
up my Union but the results are grouped and sorted within the two
queries but not between the two queries. The example
Can anyone tell me how to sort the combined results of a Union query?
Right now I have a Group By and Order By in both of my queries that make
up my Union but the results are grouped and sorted within the two
queries but not between the two queries. The example below demonstrates
my problem
Can anyone tell me how to sort the combined results of a Union query?
(Select Name From Employee Group By Name Order By Name)
Union (Select Name From Consultant Group By Name Order By Name);
Just add another order by on the end after the parenthesis:
(Select Name From Employee Group
hello,
When I perform a large union query with 11 tables I often get this error:
Lost connection to MySQL server during query
If I shorten the query to say, 3 or 4 tables, I never get that error. The
thing is, the large 11 table union query works sometimes, probably 3 out of
5.
Any ideas
I should also mention that this error is only happening using the mysql C
API ( mysql_query() ). If i use mysql client and paste the exact same query,
i get the proper result everything.
thanks,
paul
hello,
When I perform a large union query with 11 tables I often get this error:
Lost
mysql client and paste the exact same
query,
i get the proper result everything.
thanks,
paul
hello,
When I perform a large union query with 11 tables I often get this
error:
Lost connection to MySQL server during query
If I shorten the query to say, 3 or 4 tables, I never get
11 matches
Mail list logo