prepare('SELECT blog_posts_seo.postID FROM blog_posts_seo, blog_post_licences WHERE blog_posts_seo.postID = blog_post_licences.postID_BPL AND blog_post_licences.licenceID_BPL = :licenceID'); $stmt->execute(array(':licenceID' => $row['licenceID'])); $count = $stmt->rowCount(); //pass number of records to $pages->set_total($stmt->rowCount()); $stmt = $db->prepare(' SELECT blog_posts_seo.postID, blog_posts_seo.postTitle, blog_posts_seo.postAuthor, blog_posts_seo.postSlug, blog_posts_seo.postDesc, blog_posts_seo.postDate FROM blog_posts_seo, blog_post_licences WHERE blog_posts_seo.postID = blog_post_licences.postID_BPL AND blog_post_licences.licenceID_BPL = :licenceID ORDER BY postID DESC '.$pages->get_limit()); $stmt->execute(array(':licenceID' => $row['licenceID'])); echo '
'.$row['licenceTitle'].'
'; if (empty($count)) { echo 'Aucun torrent pour cette licence.
'; } while($row1 = $stmt->fetch()){ echo ''; } echo ''; echo $pages->page_links('l-'.html($_GET['id']).'&'); } catch(PDOException $e) { echo $e->getMessage(); } ?>