예제 #1
0
	
	<div id="principal">
		
		<h1>Propiedades</h1>
		
		
		
		
		
		<?php 
// 1. the current page number ($current_page)
$page = !empty($_GET['page']) ? (int) $_GET['page'] : 1;
// 2. records per page ($per_page)
$per_page = 10;
// 3. total record count ($total_count)
$total_count = Propiedades::count_all();
$pagination = new Pagination($page, $per_page, $total_count);
// Instead of finding all records, just find the records
// for this page
$sql = "SELECT * FROM propiedades ORDER BY id DESC ";
$sql .= "LIMIT {$per_page} ";
$sql .= "OFFSET {$pagination->offset()}";
$propiedades = Propiedades::find_by_sql($sql);
?>
		
		<table id="productos-listado" cellspacing="1" cellpadding="0" width="100%">
			
			<tr>
				
				<th align="center" valign="middle" width="20%">Departamento</th>