query(' SELECT ma.author_name, COUNT(b.biblio_id) AS hasil FROM mst_author AS ma LEFT JOIN biblio_author AS ba ON ma.author_id=ba.author_id LEFT JOIN biblio AS b ON ba.biblio_id= b.biblio_id GROUP BY ma.author_id'); if ($authors_q->num_rows > 0) { while ($authors = $authors_q->fetch_assoc()) { $aut = $authors['author_name']; $r_aut = str_replace(',',' ',$aut); $value = 1; $last_name = implode("", array_slice(explode(" ", $r_aut),0,$value)); echo '
No Librarian data yet
'; }