>>>>> "chas" == chas <panda@stripped> writes:
chas> Skimming from the archives :
chas> a) is JOIN still a low priority off-the-radar 'to do item' ?
chas> it's a bit surprising since i would have thought this one of
chas> the more useful functions which can save a lot of coding.
I assume you mean UNION?
chas> b) isn't the method outlined below (of creating a temp table)
chas> too slow for web applications ?
No; If you use HEAP temporary tables, this should be as fast as if you
have a native UNION. (In some cases even faster as you can be more
specific in your queries and don't have to rely on the query optimizer)
chas> cheers,
chas> chas
chas> from archives :
Neal> I need all the contents of "reports" and "comments" in one result set,
Neal> without the two being joined, and I need to join "companies" to both. It
Neal> sounds like I need UNION, nut MySQL doesn't support it right now. How do
Neal> you do a UNION using existing commands available.
chas> If I understand you correctly:
chas> (Note for the future; It always helps if you include an example for
chas> what you really mean)
chas> - Create a temporary table
chas> - INSERT INTO temporary_table SELECT * from table1 where ..
chas> - INSERT INTO temporary_table SELECT * from table2 where ..
chas> - SELECT ... FROM temporary_table
chas> - DROP temporary_table
Regards,
Monty