Hello,
Thank you in advance for your time and efforts, it is greatly received.
I am trying to get the number of records in a database into a variable in php, is this the best way to go about it?
$dbCount = "";
$resData = mysql_db_query ("clothesimages", "SELECT COUNT (*) FROM sportswear GROUP BY image");
while ($entry = mysql_fetch_array ($resData))
{
$dbCount = $dbCount . $entry["image"];
}
What would i put where 'image' is? When i have done this before, i have just put the names of the attributes in there, but because i am just doing a COUNT(*) i don't have any?
Do i put my GROUP BY clause in there instead?
Should i even be using mysql_fetch_arrray?
Thank you once again for your advice.
Regards, Bastern 🙂