Results 1 to 9 of 9
Thread: Paging issue
Sep 13, 2012, 20:22 #1
- Join Date
- Aug 2004
- 0 Post(s)
- 0 Thread(s)
I have the following code that is failing because the field is varchar, but is expecing int..
$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?