Re: [PHP] need help with mysql union

2003-07-21 Thread CPT John W. Holmes
> hi, i'm trying to select * through 3 tables - is the following syntax correct? > > $sql="(SELECT * FROM mjp_cc)"; > $sql="UNION"; > $sql="(SELECT * FROM imc_cc)"; > $sql="UNION"; > $sql="(SELECT * FROM pmp_cc)"; > $sql.=" ORDER BY savedccactivity DESC"; > > i basically just want to spit out the c

[PHP] need help with mysql union

2003-07-21 Thread r-militante
hi, i'm trying to select * through 3 tables - is the following syntax correct? $sql="(SELECT * FROM mjp_cc)"; $sql="UNION"; $sql="(SELECT * FROM imc_cc)"; $sql="UNION"; $sql="(SELECT * FROM pmp_cc)"; $sql.=" ORDER BY savedccactivity DESC"; i basically just want to spit out the contents of these t