Foros del Web » Programando para Internet » PHP »

Problema con enlace en una consulta

Estas en el tema de Problema con enlace en una consulta en el foro de PHP en Foros del Web. Hola tengo un error en una consulta, aqui adjunto el codigo Código PHP: <html> <head> <title>Departamentos</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body {     background-color: #F2E09E; } --> </style> </head> ...
  #1 (permalink)  
Antiguo 18/07/2006, 10:01
 
Fecha de Ingreso: julio-2006
Mensajes: 2
Antigüedad: 17 años, 9 meses
Puntos: 0
Problema con enlace en una consulta

Hola
tengo un error en una consulta, aqui adjunto el codigo
Código PHP:
<html>
<head>
<title>Departamentos</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
    background-color: #F2E09E;
}
-->
</style>
</head>

<body>
<div align="left">
<?php 
   
include("conexal.phtml"); 
   
$link=Conectarse(); 
   
$result=mysql_query("select * FROM alqjkb WHERE (Tipo='departamento') ORDER BY dormitorios ASC, propiedad ASC ",$link); 
?> 
  <table width="680" border="0" cellpadding="0" cellspacing="0" bgcolor="#D3FED5" height="100%">
    <tr> 
      <td width="632" rowspan="10" valign="bottom" bgcolor="#ffffff" height="79">
        <div align="left"> 
          <table width="630" border="1" style="border-collapse: collapse" bordercolor="#ffffff" cellpadding="0" cellspacing="0">

            <?php 
    

          
if($row mysql_fetch_array($result)) { do {
           
printf("<tr><td width=75 height=75 align=center valing=middle border=1 ><a href="v_fotos.php?n='.$row["fotos"].'"><img src='imabasal/%s' width =70 height=70></a></td>
            <td width=535 align=left valing=middle>
            <font face=ArialBlack size=4>&nbsp%s</font></td></tr>"
,
           
$row["foto"],$row["detalle"]); 

           } 
          while(
$row mysql_fetch_array($result));}
          else {  echo 
"No se encuentan departamentos en alquiler por el momento";    }
          
mysql_free_result($result); 
          
mysql_close($link); 
           
?> 


         </table>
        </div>
      </td>
    </tr>
  </table>
</div>
</body>
</html>
me da el suiguiente error
Parse error: parse error in c:\archivos de programa\easyphp1-8\www\mi pagina\alquiler\dptos.php on line 31
soy nuevo en php y no encuentro solucion
desde ya muchas gracias
  #2 (permalink)  
Antiguo 18/07/2006, 10:24
Avatar de Nefertiter  
Fecha de Ingreso: enero-2003
Ubicación: Rosario
Mensajes: 1.316
Antigüedad: 21 años, 3 meses
Puntos: 9
aca tenes el codigo arreglado

Código PHP:

<html> 
<head> 
<title>Departamentos</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<style type="text/css"> 
<!-- 
body { 
    background-color: #F2E09E; 

--> 
</style> 
</head> 

<body> 
<div align="left"> 
<?php  
   
include("conexal.phtml");  
   
$link=Conectarse();  
   
$result=mysql_query("select * FROM alqjkb WHERE (Tipo='departamento') ORDER BY dormitorios ASC, propiedad ASC ",$link);  
?>  
  <table width="680" border="0" cellpadding="0" cellspacing="0" bgcolor="#D3FED5" height="100%"> 
    <tr>  
      <td width="632" rowspan="10" valign="bottom" bgcolor="#ffffff" height="79"> 
        <div align="left">  
          <table width="630" border="1" style="border-collapse: collapse" bordercolor="#ffffff" cellpadding="0" cellspacing="0"> 

            <?php  
     

          
if($row mysql_fetch_array($result)) { do { 
           echo 
"<tr><td width=75 height=75 align=center valing=middle border=1 ><a href=\"v_fotos.php?n=".$row["fotos"]."\"><img src='imabasal/".$row["foto"]."' width =70 height=70></a></td> 
            <td width=535 align=left valing=middle> 
            <font face=ArialBlack size=4>&nbsp"
.$row["detalle"]."</font></td></tr>";

           }  
          while(
$row mysql_fetch_array($result));} 
          else {  echo 
"No se encuentan departamentos en alquiler por el momento";    } 
          
mysql_free_result($result);  
          
mysql_close($link);  
           
?>  


         </table> 
        </div> 
      </td> 
    </tr> 
  </table> 
</div> 
</body> 
</html>
  #3 (permalink)  
Antiguo 18/07/2006, 17:41
 
Fecha de Ingreso: julio-2006
Mensajes: 2
Antigüedad: 17 años, 9 meses
Puntos: 0
Muchisimas gracias
saludos
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 07:53.