php
$sql = mysql_query("SELECT COUNT(*) AS total,id FROM adoptables GROUP BY id")or die(mysql_error());
$sql2 = mysql_query("SELECT COUNT(*) AS total,owner_email FROM adoptables GROUP BY owner_email,owner_password")or die(mysql_error());
$row = mysql_fetch_array($sql);
$row2 = mysql_fetch_array($sql2);
echo "Server Stats are as follows:</br>";
echo "The site contains ".$row['total']." creatures under a total of ".$row2['total']." Accounts.</br>";
ok, I have this cde.... in the database, there are three rows.... they are as follows:
CODE
INSERT INTO `adoptables` (`id`, `monster_name`, `monster_type`, `monster_level`, `owner_email`, `owner_password`) VALUES
(1, 'JBrace1990', 'Admin', 21, 'email1', 'XXXX'),
(2, 'JBrace1990', 'Horse', 1, 'email1', 'XXXX'),
(3, 'Awesomeness', 'Horse', 1, 'email2', 'XXX');
NOTE: owner_email and owner_password are X'd out for a reason 8)
anyway, it should tell me there are 3 creatures and 2 accounts..... but it's not telling me a damn thing, it only says 1.... any ideas?