Hi folks,
I know this title may sounds stupid but please listen what I have to say first..
I have a created a counting clause in SQL but it returns the amount of rows that is limited per page instead of all available rows in database.
Here is my sql script:
$Limitedrows = 20;
$query = "SELECT count(*) AS `counted`, `cateid`,`subcateid`,`picture`
FROM pixors
WHERE (pixors.`cateid` = '$categoryID') AND (pixors.`subcateid` = '$subcategoryID')
GROUP BY `picture`
ORDER BY `id` DESC
LIMIT ".$Limitedrows.",".$rowsPerPage;
when I fetch the array I should be able to see all affected rows by the following code; $row['counted']; , there are more than 20 entries, but I see only the amount that I've limited(20) to be seen per page(=$Limitedrows). Whats am I doing wrong here? 🙁
Any comment/suggestions would be appreciated, thanks!