Ver Mensaje Individual
  #7 (permalink)  
Antiguo 03/10/2008, 06:00
adibu
 
Fecha de Ingreso: septiembre-2007
Mensajes: 50
Antigüedad: 16 años, 7 meses
Puntos: 0
Respuesta: Conseguir que no se vean los datos de la tabla en tiempo real

Apreciados amigos.

He creado un campo un campo nuevo en MYSQL llamado validar de tipo INT(1) en predeterminado le he puesto el valor 0

Ahora ya no sé el código que debo poner en la página ni cuando revise los correos cómo les doy el valor 1 para que se visualicen en la página.

Si necesitáis el código de la página es el siguiente:


<?php require_once('Connections/conexionconsultas.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];

$maxRows_ver = 20;
$pageNum_ver = 0;
if (isset($_GET['pageNum_ver'])) {
$pageNum_ver = $_GET['pageNum_ver'];
}
$startRow_ver = $pageNum_ver * $maxRows_ver;

mysql_select_db($database_conexionconsultas, $conexionconsultas);
$query_ver = "SELECT * FROM `general`";
$query_limit_ver = sprintf("%s LIMIT %d, %d", $query_ver, $startRow_ver, $maxRows_ver);
$ver = mysql_query($query_limit_ver, $conexionconsultas) or die(mysql_error());
$row_ver = mysql_fetch_assoc($ver);

if (isset($_GET['totalRows_ver'])) {
$totalRows_ver = $_GET['totalRows_ver'];
} else {
$all_ver = mysql_query($query_ver);
$totalRows_ver = mysql_num_rows($all_ver);
}
$totalPages_ver = ceil($totalRows_ver/$maxRows_ver)-1;

$queryString_ver = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_ver") == false &&
stristr($param, "totalRows_ver") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_ver = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_ver = sprintf("&totalRows_ver=%d%s", $totalRows_ver, $queryString_ver);
?><!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>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="760" align="center">
<tr>
<th width="120" scope="col">fecha</th>
<th width="333" scope="col">reforma</th>
<th width="181" scope="col">localidad</th>
<th width="106" scope="col">provincia</th>
</tr>
<?php do { ?>

<tr>

<td><div align="center"><?php echo date("d-m-y");?></div></td>
<td><div align="center"><a href="datos_cliente.php?Id=<?php echo $row_ver['Id']; ?>" target="_blank"><?php echo $row_ver['reforma']; ?></a></div></td>
<td><div align="center"><a href="datos_cliente.php?Id=<?php echo $row_ver['Id']; ?>" target="_blank"><?php echo $row_ver['Localidad']; ?></a></div></td>
<td><div align="center"><a href="datos_cliente.php?Id=<?php echo $row_ver['Id']; ?>" target="_blank"><?php echo $row_ver['Provincia']; ?></a></div></td>
</tr>
<?php } while ($row_ver = mysql_fetch_assoc($ver)); ?>
</table>
<br />
<table width="760">
<tr>
<td width="78"><?php if ($pageNum_ver > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_ver=%d%s", $currentPage, max(0, $pageNum_ver - 1), $queryString_ver); ?>" target="_blank">Anterior</a>
<?php } // Show if not first page ?> </td>
<td width="589">&nbsp;</td>
<td width="77"><?php if ($pageNum_ver < $totalPages_ver) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_ver=%d%s", $currentPage, min($totalPages_ver, $pageNum_ver + 1), $queryString_ver); ?>" target="_blank">Siguiente</a>
<?php } // Show if not last page ?> </td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result($ver);
?>



Saludos.