Msg#: 4400225 posted 6:18 pm on Dec 21, 2011 (gmt 0)
I am trying to get a script to show which companies have more than one user per account number. It sort of works, but I wanted to see how many were actually being used.
Code: $table_name=(USER); $query = "SELECT organization_title, email, account_number,COUNT(*) AS Count FROM $table_name GROUP BY account_number HAVING Count > 1; "; $result = mysql_query($query) or die("No Account Numbers Present!" . mysql_error());
Msg#: 4400225 posted 4:59 pm on Dec 22, 2011 (gmt 0)
Thank you! Hmm. That's not quite the output I was looking for. I was looking for a literal count of how many email addresses there were for the one account number. I've seen examples of the count array, but not sure how it relates to db access. Please help me understand. Thanks!