buenas noches amigos foreros del ya refamoso FOROS DEL WEB saludos desde Colombia, una vez mas en busca de su valiosa ayuda con lo siguiente
tengo una tabla dinamica que muestra los resultados de una consulta, al final de cada fila tengo un link VER quiciera qe si el campo
locationde esa fila dice
out que el link VER no se mostrara.
e tratado con if y else pero como no se programacion me he complicado muchisimo.
DE ANTEMANO GRACIAS POR SU ATENCION .......
esto es lo que tengo en codigo
Código PHP:
Ver original<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
}
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 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) { $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
$colname_Recordset1 = "-1";
if (isset($_GET['busca'])) { $colname_Recordset1 = $_GET['busca'];
}
$query_Recordset1 = sprintf("SELECT id, sap, mac, serial, categoria, estado, location, fecha FROM maestra WHERE serial = %s ORDER BY id DESC", GetSQLValueString
($colname_Recordset1, "text")); $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
if (isset($_GET['totalRows_Recordset1'])) { $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-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=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<p><a href="index.php">buscar</a> - LINE GEAR - VERIFICAR</p>
<table border="1">
<tr>
<td>id</td>
<td>fecha</td>
<td>sap</td>
<td>mac</td>
<td>serial</td>
<td>categoria</td>
<td>estado</td>
<td>location</td>
<td> </td>
<td> </td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['id']; ?></td>
<td><?php echo $row_Recordset1['fecha']; ?></td>
<td><?php echo $row_Recordset1['sap']; ?></td>
<td><?php echo $row_Recordset1['mac']; ?></td>
<td><?php echo $row_Recordset1['serial']; ?></td>
<td><?php echo $row_Recordset1['categoria']; ?></td>
<td><?php echo $row_Recordset1['estado']; ?></td>
<td><?php echo $row_Recordset1['location']; ?></td>
<td><a href="actualiza2.php?busca=<?php echo $row_Recordset1['serial']; ?>&busca2=<?php echo $row_Recordset1['fecha']; ?>">VER</a></td>
<td><a href="resultados.php?busca=<?php echo $row_Recordset1['serial']; ?>&busca2=<?php echo $row_Recordset1['fecha']; ?>">CONTINUAR</a></td>
</tr>
</table>
</body>
</html>
<?php
?>