Foros del Web » Programando para Internet » PHP »

Consulta no retorna todos los valores

Estas en el tema de Consulta no retorna todos los valores en el foro de PHP en Foros del Web. Hola a todos...tengo un array el cual lo pasó de una página a otra, luego lo utilizó en la segunda página para poder realizar una ...
  #1 (permalink)  
Antiguo 17/11/2007, 20:46
 
Fecha de Ingreso: junio-2002
Mensajes: 261
Antigüedad: 21 años, 10 meses
Puntos: 0
Consulta no retorna todos los valores

Hola a todos...tengo un array el cual lo pasó de una página a otra, luego lo utilizó en la segunda página para poder realizar una consulta, pero akí si el array trae nueve elementos solo me retorna 8.

Akí esta el código para que me ayuden indicandome que puede estar mal...gracias



<?php require_once('Connections/Audito.php'); ?>
<?php
//$maxRows_SQLCheckBox = 10;
$pageNum_SQLCheckBox = 0;
if (isset($_GET['pageNum_SQLCheckBox'])) {
$pageNum_SQLCheckBox = $_GET['pageNum_SQLCheckBox'];
}
$startRow_SQLCheckBox = $pageNum_SQLCheckBox * $maxRows_SQLCheckBox;

$colname_SQLCheckBox = "-1";
if (isset($_POST['Check[]'])) {
$colname_SQLCheckBox = (get_magic_quotes_gpc()) ? $_POST['Check[]'] : addslashes($_POST['Check[]']);
}
mysql_select_db($database_Audito, $Audito);
PregMaster = %s", $colname_SQLCheckBox);
if(!empty($_POST['check']))
{
$aLista=array_keys($_POST['check']);
}
$query_SQLCheckBox = "SELECT * FROM preguntas WHERE PregMaster IN (".implode(',',$aLista).")";
$query_SQLCheckBox, $startRow_SQLCheckBox, $maxRows_SQLCheckBox);
die(mysql_error());
$SQLCheckBox = mysql_query($query_SQLCheckBox, $Audito) or die(mysql_error());
$row_SQLCheckBox = mysql_fetch_assoc($SQLCheckBox);
$totalRows_SQLCheckBox = mysql_num_rows($SQLCheckBox);

$totalPages_SQLCheckBox = ceil($totalRows_SQLCheckBox/$maxRows_SQLCheckBox)-1;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<?php do { ?>
<table width="95%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><label>
<input name="checkseries2[]" type="checkbox" id="checkseries2[]" value="<?php echo $row_SQLCheckBox['codigo']; ?>" />
</label></td>
<td><?php echo $row_SQLCheckBox['detalle']; ?></td>
<td><?php echo $row_SQLCheckBox['cod_criterio']; ?></td>
<td><?php echo $row_SQLCheckBox['Nro_preg']; ?></td>
<td><?php echo $row_SQLCheckBox['PregMaster']; ?></td>
</tr>
</table>
<?php } while ($row_SQLCheckBox = mysql_fetch_assoc($SQLCheckBox)); ?></form>
</body>
</html>
<?php
mysql_free_result($SQLCheckBox);
?>
__________________
Buscando el camino...
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:27.