View Single Post
Old 09-26-2007, 08:21 AM   #1 (permalink)
marxx
The Contributor
 
marxx's Avatar
 
Join Date: Sep 2007
Location: Finland
Posts: 45
Thanks: 3
marxx is on a distinguished road
Default Count multiple tables + same row name

Hi!

How to count from multiple tables where all has same rowname?

table: commentsimage
rowname: poster

table: commentsprofile
rowname: poster

table: commentscafe
rowname: poster

I have tryed something like this which doesn't work tho..
PHP Code:
$count mysql_query("SELECT COUNT(poster) FROM commensimage, commentsprofile, commentscafe WHERE poster = $poster") or die(mysql_error()); 

Thanks for all help!
Send a message via MSN to marxx
marxx is offline  
Reply With Quote