Cita:
Iniciado por pateketrueke
yo lo único que veo es que falta un punto-y-coma al final de aquí...
si necesitas algunas balas yo te presto...
*********************************************
Si esta puuesta el punto y coma y cuando lo corro..sale:
Parse error: syntax error, unexpected T_VARIABLE, expecting T_WHILE in C:\secretariag\reporte\re2.php on line 25
apunta a esto:
$newvar=mysql_fetch_assoc($consultarepor);
//////////////////////// ahi va el codigo /////////////// x si aca //////////
<?php require_once('../Connections/conexion.php'); //movemos el archivo de conexiones hasta arriba ?>
<table border="1" cellpadding="1" cellspacing="1">
<tr>
<td>ntramite</td>
<td>fecing</td>
<td>interesado</td>
<td>asuning</td>
<td>desres</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_consultarepor['ntramite']; ?></td>
<td><?php echo $row_consultarepor['fecing']; ?></td>
<td><?php echo $row_consultarepor['interesado']; ?></td>
<td><?php echo $row_consultarepor['asuning']; ?></td>
<td><?php echo $row_consultarepor['desres']; ?></td>
</tr>
<?php }
$newvar=mysql_fetch_assoc($consultarepor);
//creamos una nueva variabnle almacenando el resultado del array
while ($row_consultarepor = $newvar); ?>
</table>
<?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_consultarepor = 10;
$pageNum_consultarepor = 0;
if (isset($_GET['pageNum_consultarepor'])) {
$pageNum_consultarepor = $_GET['pageNum_consultarepor'];
}
$startRow_consultarepor = $pageNum_consultarepor * $maxRows_consultarepor;
mysql_select_db($database_conexion, $conexion);
$query_consultarepor = "SELECT ingreso.ntramite, ingreso.fecing, ingreso.interesado, ingreso.asuning, estado_resolu.desres FROM ingreso, estado_resolu WHERE ingreso.idper = 1 AND ingreso.codres = estado_resolu.codres";
$query_limit_consultarepor = sprintf("%s LIMIT %d, %d", $query_consultarepor, $startRow_consultarepor, $maxRows_consultarepor);
$consultarepor = mysql_query($query_limit_consultarepor, $conexion) or die(mysql_error());
$row_consultarepor = mysql_fetch_assoc($consultarepor);
if (isset($_GET['totalRows_consultarepor'])) {
$totalRows_consultarepor = $_GET['totalRows_consultarepor'];
} else {
$all_consultarepor = mysql_query($query_consultarepor);
$totalRows_consultarepor = mysql_num_rows($all_consultarepor);
}
$totalPages_consultarepor = ceil($totalRows_consultarepor/$maxRows_consultarepor)-1;
mysql_free_result($consultarepor);
?>