Really Struggling to Paginate Results MSSQL/PHP/PDO

Mega thanks to you for your help, all working now.

I changed the count query slightly as I found a conflict. If a publication had no issues, it was still included within the count adding 1 to the total and giving me blank pages. Here is what I changed the count query to for anyone interested:

$query = $dbconn->prepare("SELECT     COUNT(publication.id) AS Publications
FROM         publication INNER JOIN
                      publication_issue ON publication.id = publication_issue.publication_id
WHERE     (publication.tags LIKE :tags)"); 
$query->execute(array(':tags'=>'%e%'));
$totalRecords = $query->fetch(PDO::FETCH_ASSOC); 

Is there a way to add reputation on this site? You definitely deserve it!

Thanks again.

You will probably want to change the major query to use INNER JOIN too, as you really want them working the same.

At this time there isn’t. There has been many discussions on it (so maybe one day). Glad everything is working.

I think SP used to have a reputation facility many many years ago (when I first joined), but it’s been gone for a long time now. We joined the same year - do you remember that also? (Or am I confusing this with a different forum?)

Off Topic:

:lol: Do I remember that… unfortunately, my memory isn’t that great. I know at one point it was using phpBB and then they migrated to vBulletin, but I really can’t recall how the forums behaved then compared to now. They could have had it, I just don’t remember.