I have the following code that is failing because the field is varchar, but is expecing int..
I was under the assumtion that if I changed:Code:
$query = "SELECT COUNT(*) as Num FROM products WHERE productgroup = 'Some Group'";
$total_pages = mysql_fetch_array(mysql_query($query));
$total_pages = $total_pages[num];
SELECT COUNT(pid) <-- pid field is int
That it would use that field to count results, not the productgroup field?