Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/10/2006, 07:57
mvlsistemas
 
Fecha de Ingreso: mayo-2004
Mensajes: 903
Antigüedad: 20 años
Puntos: 4
consulta select con if y else

Hola tengo esta consulta pero quiero agregar un combo que me selecione segun 1>estrellas 2>precio esta consulta y me la muestre en pantalla. tendria que hacer un formu con menu de salto con estrellas y precio pero no puedo hacer el if y else para el select.

Código PHP:
<php>$_pagi_sql=("SELECT hotel,estrellas,vigencia,sgl,dbl,tpl,suite,cama,adicional,htm from paquetes WHERE web ='at_cuyo' order by estrellas Desc");
//cantidad de resultados por página (opcional, por defecto 20)
$_pagi_cuantos 20
//Incluimos el script de paginación. Éste ya ejecuta la consulta automáticamente
include("paginator.inc.php");
echo 
'<table width="580" border="0" bgcolor="#993366" cellpadding="0" cellspacing="0" >';
echo
'
  <tr height="25"> 
    <td width="150" align="left"><strong><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Argentina</font></strong></td>
    <td height="20" width="10" align = "left" > 
     <strong> 
     <font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">*</font></strong></td>
    <td width="100"  align="center"><strong><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Vigencia</font></strong></td>
    <td width="30"align="center"><strong><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">SGL</font></strong></td>
    <td width="30" align="center"><strong><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">DBL</font></strong></td>
    <td width="30" align="center"><strong><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">TPL</font></strong></td>
    <td width="30" align="center"><strong><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">SUITE</font></strong></td>
    <td width="30" align="center"><img src="iconocama.gif" width="19" height="20"></td>
    <td width="80" align="lcenter"><strong><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">ADICIONAL</font></strong></td>
    <td width="30" align="center"><strong><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Fotos</font></strong></td>
  </tr>'
// Así escribimos la cabecera de la tabla

while ($row mysql_fetch_array($_pagi_result)) { 

if (
$colorfila==0){
       
$color"#F4EACA";
       
$colorfila=1;
    }else{
       
$color="#FFFFE6";
       
$colorfila=0;
    }


 echo 
'<tr bgcolor='.$color.'>''<td  height="20" width="150" height="4" >'.'<strong>'.$row['hotel'].'</td>'.'</strong>'.'<td height="20" width="10" align = "left" >'.'<strong>'.$row['estrellas'].'</td>'.'</strong>'.'<td width="100"  align = "center" >'.'<strong>'.$row['vigencia'].'</td>'.'</strong>'.'<td height="20" width="30" align = "center" >'.'<strong>'.$row['sgl'].'</td>'.'</strong>'.'<td height="20" width="30"  align = "center" >'.'<strong>'.$row['dbl'].'</td>'.'</strong>'.'<td height="20" width="30" align = "center" >'.'<strong>'.$row['tpl'].'</td>'.'</strong>'.'<td width="30"  align = "center" >'.'<strong>'.$row['suite'].'</td>'.'</strong>'.'<td height="20" width="30" align = "center" >'.'<strong>'.$row['cama'].'</td>'.'</strong>'.'<td height="20" width="80" align="center">'.'<strong>'.$row['adicional'].'</td>'.'</strong>'.'<td height="20"width="30" align ="center">'.$row['htm'].'</td>'.'</tr>';

}

echo 
'</table>'// Fin de la tabla.
echo"<p>".$_pagi_navegacion."</p>";
?>