Hi,
This is my first post here so forgive me if its too simple or not right.

basically what i do is:
SELECT COUNT(*) FROM table1 where cno=3;
(and dumping it into a variable $theResult - I am using PHP)
and it gives me the result, but now i need to do this in 5 tables...

I can of course run 5 count statements but was wondering if I can do the
whole thing in one statement?
A friend of mine told me to try "union" but when i go to the documentation
of union I cant understand much and it says "UNION is implemented in MySQL
4.0.0" I have no idea what version i have.

The 5 tables are pretty much the same and have the same "cno" field that i
need and are named table1,table2,table3,table4,table5

Can anybody help me please? Thanks in advance.

cheers,
-Ryan



We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to