Foros del Web » Programando para Internet » PHP »

Formulario de order by

Estas en el tema de Formulario de order by en el foro de PHP en Foros del Web. hola a todos buenas tardes, acudo a ustedes en este caso, tengo una pagina en php que muestra unos registros mysql ahi todo bien, arriba ...
  #1 (permalink)  
Antiguo 23/10/2010, 15:26
Avatar de oscarios  
Fecha de Ingreso: septiembre-2004
Mensajes: 186
Antigüedad: 19 años, 7 meses
Puntos: 2
Formulario de order by

hola a todos buenas tardes, acudo a ustedes en este caso, tengo una pagina en php que muestra unos registros mysql ahi todo bien, arriba puse un formulario orderby para seleccionar por que campos ordenar la consulta pero no me ha querido funcionar,,,,,les muestro el codigo a ver si me pueden dar una manito, MIL GRACIAS
Código PHP:
Ver original
  1. <?php require_once('Connections/conbanca.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  5. {
  6.   if (PHP_VERSION < 6) {
  7.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  8.   }
  9.  
  10.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  11.  
  12.   switch ($theType) {
  13.     case "text":
  14.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  15.       break;    
  16.     case "long":
  17.     case "int":
  18.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  19.       break;
  20.     case "double":
  21.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  22.       break;
  23.     case "date":
  24.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  25.       break;
  26.     case "defined":
  27.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  28.       break;
  29.   }
  30.   return $theValue;
  31. }
  32. }
  33.  
  34. $currentPage = $_SERVER["PHP_SELF"];
  35.  
  36. $maxRows_Recordset1 = 10;
  37. $pageNum_Recordset1 = 0;
  38. if (isset($_GET['pageNum_Recordset1'])) {
  39.   $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
  40. }
  41. $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
  42.  
  43. $colname_Recordset1 = "-1";
  44. if (isset($_GET['busca'])) {
  45.   $colname_Recordset1 = $_GET['busca'];
  46. }
  47. $colname2_Recordset1 = "-1";
  48. if (isset($_GET['busca2'])) {
  49.   $colname2_Recordset1 = $_GET['busca2'];
  50. }
  51. $colname3_Recordset1 = "-1";
  52. if (isset($_GET['busca3'])) {
  53.   $colname3_Recordset1 = $_GET['busca3'];
  54. }
  55. $colname4_Recordset1 = "-1";
  56. if (isset($_GET['campo'])) {
  57.   $colname4_Recordset1 = $_GET['campo'];
  58. }
  59. $colname5_Recordset1 = "-1";
  60. if (isset($_GET['orden'])) {
  61.   $colname5_Recordset1 = $_GET['orden'];
  62. }
  63. mysql_select_db($database_conbanca, $conbanca);
  64. $query_Recordset1 = sprintf("SELECT * FROM inmuebles WHERE ciudad LIKE %s AND zona LIKE %s AND tipo LIKE %s ORDER BY %s  %s", GetSQLValueString("%" . $colname_Recordset1 . "%", "text"),GetSQLValueString("%" . $colname2_Recordset1 . "%", "text"),GetSQLValueString("%" . $colname3_Recordset1 . "%", "text"),GetSQLValueString($colname4_Recordset1, "text"),GetSQLValueString($colname5_Recordset1, "text"));
  65. $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
  66. $Recordset1 = mysql_query($query_limit_Recordset1, $conbanca) or die(mysql_error());
  67. $row_Recordset1 = mysql_fetch_assoc($Recordset1);
  68.  
  69. if (isset($_GET['totalRows_Recordset1'])) {
  70.   $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
  71. } else {
  72.   $all_Recordset1 = mysql_query($query_Recordset1);
  73.   $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
  74. }
  75. $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
  76.  
  77. $queryString_Recordset1 = "";
  78. if (!empty($_SERVER['QUERY_STRING'])) {
  79.   $params = explode("&", $_SERVER['QUERY_STRING']);
  80.   $newParams = array();
  81.   foreach ($params as $param) {
  82.     if (stristr($param, "pageNum_Recordset1") == false &&
  83.         stristr($param, "totalRows_Recordset1") == false) {
  84.       array_push($newParams, $param);
  85.     }
  86.   }
  87.   if (count($newParams) != 0) {
  88.     $queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
  89.   }
  90. }
  91. $queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);
  92. ?>
  93. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  94. <html xmlns="http://www.w3.org/1999/xhtml">
  95. <head>
  96. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
  97. <title>Documento sin t&iacute;tulo</title>
  98. </head>
  99.  
  100. <body>
  101. <table width="90%" border="0" cellspacing="0" cellpadding="2">
  102. </table>
  103. <table width="100%" border="0" cellspacing="0" cellpadding="2">
  104.   <tr>
  105.     <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
  106.       <tr>
  107.         <td> Registros <?php echo ($startRow_Recordset1 + 1) ?> a <?php echo min($startRow_Recordset1 + $maxRows_Recordset1, $totalRows_Recordset1) ?> de <?php echo $totalRows_Recordset1 ?></td>
  108.         <td><form id="form1" name="form1" method="get" action="result2b.php">
  109.           <select name="campo" id="campo">
  110.             <option value="barrio">Seleccione un campo</option>
  111.             <option value="barrio">Barrio</option>
  112.             <option value="valor">Valor</option>
  113.             <option value="area">Area</option>
  114.             <option value="habitaciones">Habitaciones</option>
  115.             <option value="codigo_inm">Codigo</option>
  116.           </select>
  117.           <select name="orden" id="orden" method="get">
  118.             <option value="ASC" selected="selected">Orden</option>
  119.             <option value="ASC">Ascendente</option>
  120.             <option value="DESC">Descendente</option>
  121.           </select>
  122.           <input name="busca" type="hidden" id="busca" value="<?php echo $row_Recordset1['ciudad']; ?>" />
  123.           <input name="busca2" type="hidden" id="busca2" value="<?php echo $row_Recordset1['zona']; ?>" />
  124.           <input name="busca3" type="hidden" id="busca3" value="<?php echo $row_Recordset1['tipo']; ?>" />
  125.           <label for="button"></label>
  126.           <input type="submit" name="button" id="button" value="Enviar" />
  127.         </form></td>
  128.         <td><table border="0">
  129.           <tr>
  130.             <td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
  131.                 <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>"><img src="First.gif" border="0" /></a>
  132.                 <?php } // Show if not first page ?></td>
  133.             <td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
  134.                 <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>"><img src="Previous.gif" border="0" /></a>
  135.                 <?php } // Show if not first page ?></td>
  136.             <td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
  137.                 <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>"><img src="Next.gif" border="0" /></a>
  138.                 <?php } // Show if not last page ?></td>
  139.             <td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
  140.                 <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>"><img src="Last.gif" border="0" /></a>
  141.                 <?php } // Show if not last page ?></td>
  142.             </tr>
  143.         </table></td>
  144.       </tr>
  145.     </table></td>
  146.   </tr>
  147.   <tr>
  148.     <td><?php do { ?>
  149.         <table width="100%" border="0" cellspacing="0" cellpadding="2">
  150.           <tr>
  151.             <td rowspan="3"><img src="photos/<?php echo $row_Recordset1['foto_a']; ?>" width="150" height="112" /></td>
  152.             <td align="center">Barrio</td>
  153.             <td align="center">Valor Venta</td>
  154.             <td align="center">Area</td>
  155.             <td align="center">Habit.</td>
  156.             <td align="center">Codigo</td>
  157.             <td rowspan="3">&nbsp;</td>
  158.           </tr>
  159.           <tr>
  160.             <td align="center"><?php echo $row_Recordset1['barrio']; ?></td>
  161.             <td align="center"><?php echo $row_Recordset1['valor']; ?></td>
  162.             <td align="center"><?php echo $row_Recordset1['area']; ?></td>
  163.             <td align="center"><?php echo $row_Recordset1['habitaciones']; ?></td>
  164.             <td align="center"><?php echo $row_Recordset1['codigo_inm']; ?></td>
  165.           </tr>
  166.           <tr>
  167.             <td colspan="5"><?php echo $row_Recordset1['masinfo']; ?></td>
  168.           </tr>
  169.         </table>
  170.         <br />
  171.         <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?></td>
  172.   </tr>
  173. </table>
  174. <p>&nbsp;</p>
  175. <p>&nbsp;</p>
  176. </body>
  177. </html>
  178. <?php
  179. mysql_free_result($Recordset1);
  180. ?>
__________________
oscariosdw
  #2 (permalink)  
Antiguo 24/10/2010, 11:48
Avatar de repara2  
Fecha de Ingreso: septiembre-2010
Ubicación: München
Mensajes: 2.445
Antigüedad: 13 años, 7 meses
Puntos: 331
Respuesta: Formulario de order by

Hola oscarios, no te funciona porque la sentencia order by no se ejecuta nunca, el problema está aquí:
Código PHP:
$query_Recordset1 sprintf("SELECT * FROM inmuebles WHERE ciudad LIKE %s AND zona LIKE %s AND tipo LIKE %s ORDER BY %s  %s"GetSQLValueString("%" $colname_Recordset1 "%""text"),GetSQLValueString("%" $colname2_Recordset1 "%""text"),GetSQLValueString("%" $colname3_Recordset1 "%""text"),GetSQLValueString($colname4_Recordset1"text"),GetSQLValueString($colname5_Recordset1"text")); 
En este punto la función GetSQLValueString() no funciona. Es una función de Dreamweaver al igual que la aplicación que estás adaptando. Sobre esa función puedes leer aquí:

http://www.forosdelweb.com/f17/funci...weaver-446588/

El código casi ilegible, te recomiendo que lo reescribas más fácil y más depurable, lo que quieres se puede resolver en 20 líneas de código.
Si no logras la solución postea más codigo para ver qué pasa, saludos
  #3 (permalink)  
Antiguo 25/10/2010, 07:00
Avatar de oscarios  
Fecha de Ingreso: septiembre-2004
Mensajes: 186
Antigüedad: 19 años, 7 meses
Puntos: 2
Respuesta: Formulario de order by

ok repara2 entiendo, pero sigo sin saber solucionar mi problema, como vez el codigo es dreamweaver yo no lo hice porque casi no se de php. agradezco tu colavoracion.
__________________
oscariosdw
  #4 (permalink)  
Antiguo 26/10/2010, 16:55
Avatar de oscarios  
Fecha de Ingreso: septiembre-2004
Mensajes: 186
Antigüedad: 19 años, 7 meses
Puntos: 2
Respuesta: Formulario de order by

YA ME FUNCIONAAAAA,,,,,,,,,,,pero si organizo campo1 ascendente ,,,,,perfecto y si de una le doy campo1 descendente no lo hace, tengo que organizar por otro campo para poder volver, osea no me organiza por el mismo campo dos veces seguidas..... les muestro el codigo,,,,,agradesco sus comentarios
__________________
oscariosdw
  #5 (permalink)  
Antiguo 26/10/2010, 16:57
Avatar de oscarios  
Fecha de Ingreso: septiembre-2004
Mensajes: 186
Antigüedad: 19 años, 7 meses
Puntos: 2
Respuesta: Formulario de order by

PARTE 1
Código PHP:
Ver original
  1. <?php
  2. if(!isset($_GET['field'])){
  3.  $_GET['field']='Id';
  4. }
  5. if (!function_exists("GetSQLValueString")) {
  6. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  7. {
  8.   if (PHP_VERSION < 6) {
  9.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  10.   }
  11.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  12.  
  13.   switch ($theType) {
  14.     case "text":
  15.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  16.       break;    
  17.     case "long":
  18.     case "int":
  19.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  20.       break;
  21.     case "double":
  22.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  23.       break;
  24.     case "date":
  25.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  26.       break;
  27.     case "defined":
  28.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  29.       break;
  30.   }
  31.   return $theValue;
  32. }
  33. }
  34.  
  35. if (!function_exists("GetSQLValueString")) {
  36. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  37. {
  38.   if (PHP_VERSION < 6) {
  39.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  40.   }
  41.   if(!isset($_GET['field'])){
  42.  $_GET['field']='Id';
  43. }
  44.  
  45.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  46.  
  47.   switch ($theType) {
  48.     case "text":
  49.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  50.       break;    
  51.     case "long":
  52.     case "int":
  53.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  54.       break;
  55.     case "double":
  56.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  57.       break;
  58.     case "date":
  59.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  60.       break;
  61.     case "defined":
  62.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  63.       break;
  64.   }
  65.   return $theValue;
  66. }
  67. }
  68.  
  69. if (!function_exists("GetSQLValueString")) {
  70. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  71. {
  72.   if (PHP_VERSION < 6) {
  73.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  74.   }
  75.  
  76. if(!isset($_GET['field'])){
  77.  $_GET['field']='Id';
  78. }
  79.  
  80.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  81.  
  82.   switch ($theType) {
  83.     case "text":
  84.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  85.       break;    
  86.     case "long":
  87.     case "int":
  88.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  89.       break;
  90.     case "double":
  91.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  92.       break;
  93.     case "date":
  94.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  95.       break;
  96.     case "defined":
  97.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  98.       break;
  99.   }
  100.   return $theValue;
  101. }
  102. }
  103.  
  104. $currentPage = $_SERVER["PHP_SELF"];
  105.  
  106. $maxRows_Recordset1 = 10;
  107. $pageNum_Recordset1 = 0;
  108. if (isset($_GET['pageNum_Recordset1'])) {
  109.   $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
  110. }
  111. $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
  112.  
  113. $colname_Recordset1 = "-1";
  114. if (isset($_GET['busca'])) {
  115.   $colname_Recordset1 = $_GET['busca'];
  116. }
  117. $colpara_Recordset1 = "-1";
  118. if (isset($_GET['busca2'])) {
  119.   $colpara_Recordset1 = $_GET['busca2'];
  120. }
  121. $coltype_Recordset1 = "-1";
  122. if (isset($_GET['busca3'])) {
  123.   $coltype_Recordset1 = $_GET['busca3'];
  124. }
  125. mysql_select_db($database_conbanca, $conbanca);
  126. $query_Recordset1 = sprintf("SELECT * FROM inmuebles WHERE ciudad LIKE %s AND zona LIKE %s AND tipo LIKE %s order by ".$_GET['field']." ".$_GET['order'], GetSQLValueString("%" . $colname_Recordset1 . "%", "text"),GetSQLValueString("%" . $colpara_Recordset1 . "%", "text"),GetSQLValueString("%" . $coltype_Recordset1 . "%", "text"));
  127. $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
  128. $Recordset1 = mysql_query($query_limit_Recordset1, $conbanca) or die(mysql_error());
  129. $row_Recordset1 = mysql_fetch_assoc($Recordset1);
  130.  
  131. if (isset($_GET['totalRows_Recordset1'])) {
  132.   $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
  133. } else {
  134.   $all_Recordset1 = mysql_query($query_Recordset1);
  135.   $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
  136. }
  137. $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
  138.  
  139. $queryString_Recordset1 = "";
  140. if (!empty($_SERVER['QUERY_STRING'])) {
  141.   $params = explode("&", $_SERVER['QUERY_STRING']);
  142.   $newParams = array();
  143.   foreach ($params as $param) {
  144.     if (stristr($param, "pageNum_Recordset1") == false &&
  145.         stristr($param, "totalRows_Recordset1") == false) {
  146.       array_push($newParams, $param);
  147.     }
  148.   }
  149.   if (count($newParams) != 0) {
  150.     $queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
  151.   }
  152. }
  153. $queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);
  154. ?>
__________________
oscariosdw
  #6 (permalink)  
Antiguo 26/10/2010, 16:58
Avatar de oscarios  
Fecha de Ingreso: septiembre-2004
Mensajes: 186
Antigüedad: 19 años, 7 meses
Puntos: 2
Respuesta: Formulario de order by

PARTE 2

Código PHP:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
  5. <title>Documento sin t&iacute;tulo</title>
  6. </head>
  7.  
  8. <body>
  9. <table width="90%" border="0" cellspacing="0" cellpadding="2">
  10. </table>
  11. <table width="100%" border="0" cellspacing="0" cellpadding="2">
  12.   <tr>
  13.     <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
  14.       <tr>
  15.         <td><img src="imgs/tit_busque.jpg" width="218" height="33" /></td>
  16.         <td colspan="2" align="right"><span class="textoN">Usted encontr&oacute;&nbsp;</span><span class="encabN"><?php echo $totalRows_Recordset1 ?>&nbsp;&nbsp;<?php echo $row_Recordset1['tipo']; ?></span></td>
  17.         </tr>
  18.       <tr>
  19.         <td> Registros <?php echo ($startRow_Recordset1 + 1) ?> a <?php echo min($startRow_Recordset1 + $maxRows_Recordset1, $totalRows_Recordset1) ?> de <?php echo $totalRows_Recordset1 ?><br />
  20.           <a href="javascript:history.back(1)"><img src="imgs/volver.png" width="94" height="19" border="0" /></a></td>
  21.         <td><form id="form1" name="form1" method="get" action="result2b.php">
  22.           <select name="field" id="field">
  23.             <option value="barrio">Seleccione un campo</option>
  24.             <option value="barrio">Barrio</option>
  25.             <option value="valor">Valor</option>
  26.             <option value="area">Area</option>
  27.             <option value="habitaciones">Habitaciones</option>
  28.             <option value="codigo_inm">Codigo</option>
  29.           </select>
  30.           <select name="orden" id="orden" method="get">
  31.             <option value="ASC" selected="selected">Orden</option>
  32.             <option value="ASC">Ascendente</option>
  33.             <option value="DESC">Descendente</option>
  34.           </select>
  35.           <input name="busca" type="hidden" id="busca" value="<?php echo $row_Recordset1['ciudad']; ?>" />
  36.           <input name="busca2" type="hidden" id="busca2" value="<?php echo $row_Recordset1['zona']; ?>" />
  37.           <input name="busca3" type="hidden" id="busca3" value="<?php echo $row_Recordset1['tipo']; ?>" />
  38.           <label for="button"></label>
  39.           <input type="submit" name="button" id="button" value="Enviar" />
  40.         </form></td>
  41.         <td><table border="0">
  42.           <tr>
  43.             <td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
  44.                 <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>"><img src="First.gif" border="0" /></a>
  45.                 <?php } // Show if not first page ?></td>
  46.             <td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
  47.                 <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>"><img src="Previous.gif" border="0" /></a>
  48.                 <?php } // Show if not first page ?></td>
  49.             <td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
  50.                 <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>"><img src="Next.gif" border="0" /></a>
  51.                 <?php } // Show if not last page ?></td>
  52.             <td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
  53.                 <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>"><img src="Last.gif" border="0" /></a>
  54.                 <?php } // Show if not last page ?></td>
  55.             </tr>
  56.         </table></td>
  57.       </tr>
  58.     </table></td>
  59.   </tr>
  60.   <tr>
  61.     <td><?php do { ?>
  62.         <table width="100%" border="0" cellspacing="0" cellpadding="2">
  63.           <tr>
  64.             <td width="192" rowspan="3"><a href="result3.php?id=<?php echo $row_Recordset1['id']; ?>"><img src="photos/<?php echo $row_Recordset1['foto_a']; ?>" width="150" height="112" /></a></td>
  65.             <td width="126" align="center" nowrap="nowrap">Barrio</td>
  66.             <td width="157" align="center" nowrap="nowrap">Valor Venta</td>
  67.             <td width="101" align="center" nowrap="nowrap">Area</td>
  68.             <td width="72" align="center" nowrap="nowrap">Habit.</td>
  69.             <td width="86" align="center" nowrap="nowrap">Codigo</td>
  70.             <td width="120" rowspan="3"><a href="result3.php?id=<?php echo $row_Recordset1['id']; ?>"><img src="imgs/ingresar.png" width="100" height="25" border="0" /></a></td>
  71.           </tr>
  72.           <tr>
  73.             <td align="center"><?php echo $row_Recordset1['barrio']; ?></td>
  74.             <td align="center">$ <?php echo number_format($row_Recordset1['valor']); ?></td>
  75.             <td align="center"><?php echo $row_Recordset1['area']; ?></td>
  76.             <td align="center"><?php echo $row_Recordset1['habitaciones']; ?></td>
  77.             <td align="center"><?php echo $row_Recordset1['codigo_inm']; ?></td>
  78.           </tr>
  79.           <tr>
  80.             <td colspan="5"><?php echo $row_Recordset1['masinfo']; ?></td>
  81.           </tr>
  82.         </table>
  83.         <br />
  84.         <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?></td>
  85.   </tr>
  86. </table>
  87. <p>&nbsp;</p>
  88. <p>&nbsp;</p>
  89. </body>
  90. </html>
  91. <?php
  92. mysql_free_result($Recordset1);
  93. ?>
__________________
oscariosdw

Etiquetas: order, formulario
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 20:19.