need help with mysql union

From: Date: Mon, 21 Jul 2003 15:59:01 +0000
Subject: need help with mysql union
Groups: php.general 
Request: Send a blank email to php-general+get-156083@lists.php.net to get a copy of this message
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 tables... also - how would this type of query work if the name 'savedccactivity' is different in all 3 tables? thanks redmond

« previous php.general (#156083) next »