I'm having some trouble paginating data using an inner table join. I know that the query for a standard pagination would look something like this...
$query1="SELECT COUNT(*) AS Total FROM table WHERE terr_ID='$SESSION_TERR_ID' ORDER BY $ordertype $ranking";
but is there a way to paginate data after using a table join? I need the information off of both tables for the query and my table join looks something like this...
$query1="SELECT T2.ID, T2.pharm_ID, T1.activity AS Total FROM pharmacies T1 INNER JOIN pharmacist T2 ON T1.Ph_ID=T2.Ph_ID WHERE T1.terr_ID='$SESSION_TERR_ID'";
Does anyone know how to make such a paginating query work?