30/04/2008, 00:37
|
| | | Fecha de Ingreso: septiembre-2005 Ubicación: Córdoba
Mensajes: 1.830
Antigüedad: 19 años, 5 meses Puntos: 55 | |
Re: Duda!!**Al mostrar registros de la bd mysql...***!! primero r1 tiene q ser mayor a r2
$_POST['r1']=(int)$_POST['r1'];
$_POST['r2']=(int)$_POST['r2'];
if($_POST['r1']>$_POST['r2']){
$r=" precio >='".$_POST['r2']."' and precio<='".$_POST['r1']
}elseif(r1==r2)
{
$r="precio = '".$_POST['r1']."';
}else{
$r=" precio >='".$_POST['r1']."' and precio<='".$_POST['r2']
}
y agregas $r en
$result = mysql_query ("select * from propiedades where tipo = '$propiedad' and operacion = '$operacion'and $r");
corregi algunos detalels de sintaxis y tiene q salir andanod |