query('SELECT biblio_id, title, image FROM biblio WHERE
promoted=1 ORDER BY last_update LIMIT 10');
if ($num_rows = $topbook->num_rows) :
?>
query('SELECT b.biblio_id, b.title, ma.author_name
FROM biblio AS b
LEFT JOIN biblio_author AS ba ON b.biblio_id=ba.biblio_id
LEFT JOIN mst_author AS ma ON ba.author_id=ma.author_id ORDER by b.last_update DESC LIMIT '.$startpoint.',10');
$rowc = $dbs->query('SELECT COUNT(biblio_id) AS row FROM biblio');
$iuh = $rowc->fetch_row();
$aa = floor($iuh['0']/10)+1;
$rowcount = 0;
?>
query('SELECT b.biblio_id, ma.author_name, b.title FROM biblio AS b
LEFT JOIN biblio_author AS ba ON b.biblio_id=ba.biblio_id
LEFT JOIN mst_author AS ma ON ba.author_id=ma.author_id
GROUP BY b.biblio_id
ORDER BY b.viewer DESC
LIMIT 5');
$download = $dbs->query('SELECT b.biblio_id, b.title , ma.author_name FROM biblio AS b
LEFT JOIN biblio_author AS ba ON b.biblio_id=ba.biblio_id
LEFT JOIN mst_author AS ma ON ba.author_id=ma.author_id
GROUP BY b.biblio_id
ORDER BY b.download_biblio DESC
LIMIT 5');
?>
query('SELECT biblio_id, title FROM biblio
WHERE timestamp > DATE_SUB(curdate(), INTERVAL 1 WEEK)
ORDER BY viewer DESC
LIMIT 5');
$viewers = $dbs->query('SELECT biblio_id, title FROM biblio
ORDER BY viewer DESC
LIMIT 5');
$download = $dbs->query('SELECT biblio_id, title FROM biblio
ORDER BY download DESC
LIMIT 5');
?>