Ver Mensaje Individual
  #22 (permalink)  
Antiguo 18/11/2011, 08:07
snakepit
 
Fecha de Ingreso: diciembre-2001
Ubicación: Argentina
Mensajes: 693
Antigüedad: 22 años, 4 meses
Puntos: 1
Respuesta: Paginación super simple en php

el switch, si no pasa ninguna variable, por default me trae los 15 registros y no me pagina tampoco

Código PHP:
default;
                
mysql_query ("SET NAMES 'utf8'");
                
$resultado mysql_query("SELECT SQL_CALC_FOUND_ROWS * FROM portfolio ORDER BY year DESC LIMIT $inicioLimit, $cantidadRegistrosPorPagina",$conexion);
                
$titulo=str_replace(" ","_","$titulo");
                while (
$linea mysql_fetch_array($resultadoMYSQL_ASSOC)) {        

                    
$id=$linea['id'];
                    
$tipo=$linea['tipo'];
                    
$cliente=$linea['cliente'];
                    
$proyecto=$linea['proyecto'];
                    
$preview=$linea['preview'];
                    
$year=$linea['year'];
                    
$agencia=$linea['agencia'];

         echo 
//aqui imprimo mis resultados;
                   
}
                
mysql_free_result($resultado);
                break;