Nope...
HHmmm, this is really getting to me...
I can do distinct, I can count, but I can't combine the two?
Can't be that hard ;-)
"Daniel Clark" <[EMAIL PROTECTED]>
03/06/2004 16:49
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
"Daniel Clark" <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]>
Subject
Re: [PHP-DB] Multiple SQL queries...?
OK, how about this?
$sql = "SELECT DISTINCT(email) FROM $table";
$result = mysql_query($sql,$connection) or die("Couldn't execute query
0.");
while ($row = mysql_fetch_array($result)) {
echo $row[email] ;
$sql1 = "SELECT * FROM $table WHERE viewed = '1' AND email =
'$row[email]'";
$result1 = mysql_query($sql1,$connection) or die("Couldn't execute
query 1.");
echo ' ' . mysql_num_rows($result1) ;
}
echo $row1 ;
> Kinda, but I just wanna count how many views in total...
> Hence my $row1++; bit...
> I'll have a play with your code though...!
> Cheers,
> Tris...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php