PHP - no se donde va un trozo de codigo del paginador

 
Vista:
sin imagen de perfil
Val: 11
Ha disminuido su posición en 126 puestos en PHP (en relación al último mes)
Gráfica de PHP

no se donde va un trozo de codigo del paginador

Publicado por daniel (50 intervenciones) el 12/09/2014 01:04:39
hola a todos los que me lean, tengo el siguiente problema....
hice un buscador php para que busque las categorias, lo termine, empece a hacer el codigo de la paginacion, pero ahora quede estancado en una parte que es esta:
___-------- yo tengo entendido que para paginar con zebra hay que agregar esto despues de la clausula limit...
1
(' select * from tbltodaslaspelis LIMIT ' .(($paginacion->get_page() - 1) * $reg_por_paginas). ',' .$reg_por_paginas,$con);
... de la manera en que aparece arriba no pude porque hay otras variables que hizo dreamweaver y no las ubico bien...

BUENO ESPERO QUE ALGUIEN ME AYUDE PLIS
Aca esta el codigo casi completo en donde tengo que agregar el codigo de zebra_pagination
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$colname_cats = "-1";
if (isset($_GET['search'])) {
  $colname_cats = $_GET['search'];
}
mysql_select_db($database_categorias, $categorias);
$query_cats = sprintf('SELECT * FROM tbltodaslaspelis WHERE Info LIKE %s ORDER BY idPelicula DESC LIMIT 0,20' , GetSQLValueString("%" . $colname_cats . "%", "text"));
$cats = mysql_query($query_cats, $categorias) or die(mysql_error());
$row_cats = mysql_fetch_assoc($cats);
$totalRows_cats = mysql_num_rows($cats);
?>

y este es el codigo que no se donde va (ya agrege los otros codigos ,como el render, numero de registro etc)

1
$result = mysql_query(' select * from tbltodaslaspelis LIMIT ' .(($paginacion->get_page() - 1) * $reg_por_paginas). ',' .$reg_por_paginas,$con);

PD: no soy muy experto en php :)
de antemano gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder