![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
22/01/2017, 14:45
|
| | Fecha de Ingreso: agosto-2011
Mensajes: 36
Antigüedad: 13 años, 6 meses Puntos: 0 | |
Respuesta: enviar valor cuando se termine una fecha Cita: <?php require ('../../Connections/agregarequipos.php'); ?>
<?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;
}
}
$maxRows_Recordset1 = 1000;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_agregarequipos, $agregarequipos);
$query_Recordset1 = "SELECT * FROM clientes WHERE TIMESTAMPDIFF(DAY, fecha_final , CURDATE()) > 1";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $agregarequipos) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?>
<div class="box-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Id</th>
<th>Nombre</th>
<th>Cell</th>
<th>Ip</th>
<th>Codigo</th>
<th>Fecha de Corte</th>
<th>Estado</th>
</tr>
</thead>
<tbody>
</tr>
<?php do { ?>
<tr>
<td><a href="http://www.forosdelweb.com/f18/Contenido/buscar_cl.php?id=<?php echo $row_Recordset1['id']; ?>"> <?php echo $row_Recordset1['id']; ?> </a></td>
<td><?php echo $row_Recordset1['nombres']; ?>
<?php echo $row_Recordset1['apellido']; ?> </td>
<td><?php echo $row_Recordset1['cell']; ?> </td>
<td><?php echo $row_Recordset1['ip']; ?> </td>
<td><?php echo $row_Recordset1['codigo']; ?> </td>
<td><?php echo $row_Recordset1['fecha_final']; ?> </td>
<td><?php echo $row_Recordset1['disable']; ?> </td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</tbody>
<tfoot>
<tr>
<th>Id</th>
<th>Nombre</th>
<th>Cell</th>
<th>Ip</th>
<th>Codigo</th>
<th>Fecha de Corte</th>
<th>Estado</th>
</tr>
</tfoot>
</table> en estas lineas creo que estan mas clara mis ideas ya solo mustro los registro que solo tienen fechas vencidas podria enviar un multiple edit la verdad es que no se como hacerlo |