tengo el siguente problema con un sistema de paginacion.
me cuenta los registros  pero no me muestra los campos que quiero. osea sale registro 10 pagina 1
 
y nesesito que aparesca solo los equipos de la categoria> 5 activo>:SI
 
por favor si alguien pilla porque no me muestra los resultados que me explique cual es el error.
 
pd: estaba dentro de un sistema de login....
<?php
    include('includes/db_handler.inc.php');
 
	db_connect();	
 
	if (empty($_REQUEST['do'])) { 
	  $do=''; 
	 } else {
	   $do= $_REQUEST['do'];	   
	 }
 
  if (isset($_REQUEST['do']) && ($_REQUEST['do']=='del')) {
     db_query("DELETE FROM tbjugadores WHERE id = ".$_GET['id']);	  
  } 	
?>
 
<html>
<head>
<title><?php echo dev_config('tbconfiguracion','pagetitle'); ?></title>
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 
<style type="text/css">
<!--
body {
	background-color: #000000;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
 
<link rel="stylesheet" type="text/css" href="Paginator_v1.6.3/css/admin.css">
 
</head>
<body>
<table width="780" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#DAE1E7">
  <tr>
    <td height="30" colspan="2" valign="top" class="mambo"><img src="Paginator_v1.6.3/images/header_text.gif" width="306" height="38"></td>
  </tr>
  <tr>
    <td height="5" colspan="2" bgcolor="#D9E0E8"></td>
  </tr>
  <tr>
    <td height="3" colspan="2" valign="top"><img src="Paginator_v1.6.3/images/slice_r4_c2.jpg" width="780" height="3"></td>
  </tr>
  <tr>
    <td height="18" colspan="2" bgcolor="#DAE1E7"></td>
  </tr>
  <tr>
    <td width="151" height="100%" valign="top" bgcolor="#FFFFFF"><?php include('Paginator_v1.6.3/menuleft.inc.php'); ?></td>
    <td width="629" height="100%" valign="top" bgcolor="#DAE1E7"><table width="629" height="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="15" valign="middle" height="10"></td>
        <td width="292" height="1" valign="middle"></td>
        <td width="289" height="1" valign="top"></td>
      </tr>
      <tr valign="top">
        <td height="100%" colspan="3"><table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="textograndeNombreSeccion"><img src="images/icons/user.png" width="48" height="48"> Gestión de todos los capitanes de equipos</td>
          </tr>
          <tr>
            <td height="1" align="left" valign="top"><img src="Paginator_v1.6.3/images/3x1.gif" width="3" height="1"></td>
          </tr>
		   <tr>
		    <td height="10"></td>
		   </tr>
          <tr>
            <td valign="top"><table width="600" border="0" align="left" cellpadding="3" cellspacing="0">
                <tr>
                  <td align="left" valign="top"><?php
                          if (!empty($errorMsg)): ?>
                      <p class="error"> <?php echo $errorMsg ?> </p>
                    <?php endif ?></td>
                </tr>
              <td align="left" valign="top"><table width="599" border="0" cellpadding="0" cellspacing="0" class="adminform">
                <tr>
                  <td align="left"  class="header12subAdd">Categ.</td>
                  <td align="left"  class="header12">Equipo</td>
                  <td align="left"  class="header12">Activo</td>
                  <td align="left"  class="header1"># Pol.</td>
                  <td align="center"  class="header1">Usuario Activo</td>
                  <td align="left"  class="header1">Nombre y Apellidos</td>
                  <td colspan="2"  align="center" class="header1">Acciones</td>
                </tr>
                <?php
	         $_pagi_cuantos = 20; 
			 $_pagi_sql = ' SELECT `tbequipos`.`id` , `tbequipos`.`idcategoria` , `tbequipos`.`idpolera` , `tbequipos`.`equipo` , `tbequipos`.`activo` , `tbjugadores`.`id` AS `id1` , `tbjugadores`.`idequipo` , `tbjugadores`.`tipo` , `tbjugadores`.`numpolera` , `tbjugadores`.`nombre` , `tbjugadores`.`apellidos` , `tbjugadores`.`activo` AS `activo1` '
                  . ' FROM `tbequipos`'
                  . ' INNER JOIN `tbjugadores` ON ( `tbequipos`.`id` = `tbjugadores`.`idequipo` )'
				  . ' WHERE `tbjugadores`.`tipo`="C" '
                  . ' ORDER BY `tbequipos`.`equipo` , `tbjugadores`.`numpolera`'; 
		     include("paginator.inc.php");			  
		     while ($row = mysql_fetch_object ($_pagi_result)) {  
              ?>
                <tr class="list">
                  <td width="8%" align="left" valign="top"><?php echo dev_elemento('tbcategorias', 'categoria', 'id', $row->idcategoria); ?></td>
                  <td width="10%" align="left" valign="top"><?php echo $row->equipo;  ?></td>
                  <td width="8%" align="center" valign="top"<?php if ($row->activo=='NO') { echo "class='error'"; } else { echo "class='errorok'"; }?>><?php echo $row->activo;  ?></td>
                  <td width="8%" align="center" valign="top"><strong><?php echo $row->numpolera;  ?></strong></td>
                  <td width="9%" align="center" valign="top"><?php echo $row->activo1;  ?></td>
                  <td width="30%" valign="top"><?php echo $row->nombre.' '.$row->apellidos;  ?></td>
                  <td width="13%" align="center" valign="top"><table width="65"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td align="left" valign="top"><a href="Paginator_v1.6.3/capitan.php?do=edit&id=<?php echo $row->id1 ?>"><img src="images/icons/apply_f2.png" alt="Editar" width="32" height="32" border="0"></a></td>
                      <td align="right"><a href="Paginator_v1.6.3/capitan.php?do=edit&id=<?php echo $row->id1 ?>">Editar</a></td>
                    </tr>
                  </table></td>
                  <td width="14%" align="center" valign="top"><table width="62"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="41" align="left" valign="top"><a href="Paginator_v1.6.3/capitanes.php?do=del&id=<?php echo $row->id1 ?>" onClick="return confirm('Ud. está seguro de borrar al capitan: <?php echo $row->nombre ?>?');" ><img src="images/icons/cancel_f2.png" alt="Borrar" width="32" height="32" border="0"></a></td>
                      <td width="21" align="right"><a href="Paginator_v1.6.3/capitanes.php?do=del&id=<?php echo $row->id1 ?>" onClick="return confirm('Ud. está seguro de borrar al capitan: <?php echo $row->nombre ?>?');" >Borrar</a></td>
                    </tr>
                  </table></td>
                </tr>
                <?php	
		          }
                ?>
                <tr>
                  <td colspan="8"><?php echo $_pagi_navegacion; ?></td>
                </tr>
                <tr>
                  <td colspan="8"><hr size="1">                  </td>
                </tr>
                <tr>
                  <td colspan="8" align="left" class="pagenav">Total de Equipos: <?php echo total_rows('tbequipos');  ?>  Total de Jugadores: <?php echo total_rows('tbjugadores');  ?> </td>
                </tr>
              </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="20"></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr background="Paginator_v1.6.3/images/slice_r6_c2.jpg">
    <td height="30" colspan="2" valign="bottom"></td>
  </tr>
</table> 
  
 
