<?php 
	

		$all_book = mysql_query("SELECT * FROM books") or die(mysql_error());
			$all_books="";
		 WHILE($list_books = mysql_fetch_array($all_book)){ 
			$all_books++;
			}
		$fil = mysql_query("SELECT * FROM books WHERE section='filipiniana'") or die(mysql_error());
			$fil_books="";
		 WHILE($list_fil = mysql_fetch_array($fil)){ 
			$fil_books++;
			}	
		$thes = mysql_query("SELECT * FROM books WHERE section='thesis'") or die(mysql_error());
			$thes_books="";
		 WHILE($list_thes = mysql_fetch_array($thes)){ 
			$thes_books++;
	
			}
		$circ = mysql_query("SELECT * FROM books WHERE section='circulation'") or die(mysql_error());
			$circ_books="";
		 WHILE($list_circ = mysql_fetch_array($circ)){ 
			$circ_books++;
			
			}			
?>
	
	<div class="books_stat">
		<label class="status filipinina" style="height:<?php echo ($fil_books * $all_books)/100; ?>%" >Filipiniana</label>
		<label class="status circ" style="height:<?php echo ($circ_books* $all_books)/100; ?>%" >Circulation</label>
		<label class="status thesis" style="height:<?php echo ($thes_books* $all_books)/100; ?>%" >Thesis</label>
	</div>