Union query

2008-04-29 Thread kabel
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 )

Union query help

2004-10-22 Thread leegold
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 =

Re: Union query help

2004-10-22 Thread Rhino
- 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

re: Union Query Sorting

2004-03-13 Thread Ed Reed
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

Re: Union Query Sorting

2004-03-13 Thread Michael Stassen
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

Re: Union Query Sorting

2004-03-13 Thread Egor Egorov
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

Union Query Sorting

2004-03-12 Thread Ed Reed
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

re: Union Query Sorting

2004-03-12 Thread Jeremy March
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

Problem with large UNION query in MySQL 4.0.4-beta

2002-12-01 Thread 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 that error. The thing is, the large 11 table union query works sometimes, probably 3 out of 5. Any ideas

Re: Problem with large UNION query in MySQL 4.0.4-beta

2002-12-01 Thread paul
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

Re: Problem with large UNION query in MySQL 4.0.4-beta

2002-12-01 Thread paul
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