![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
22/02/2011, 11:50
|
| | Fecha de Ingreso: diciembre-2010
Mensajes: 788
Antigüedad: 14 años, 1 mes Puntos: 51 | |
Respuesta: Select no me selecciona Cita:
Iniciado por bUllan9ebrio Compa hace esto :
Código PHP:
Ver original$myQuery = "SELECT habitacion.id_habitacion, nombre, descricion, ocupacion_maxima, tarifa "; $myQuery = $myQuery . " FROM habitacion, Reserva "; $myQuery = $myQuery . " WHERE habitacion.id_habitacion = Reserva.id_habitacion "; $myQuery = $myQuery . " AND ocupacion_maxima >= " . $_POST["adultos"] ; $myQuery = $myQuery . " AND fecha_entrada >= '" . $_POST["fecha_entrada"] . "' "; $myQuery = $myQuery . " AND fecha_salida <= '" . $_POST["fecha_salida"] . "' "; $myQuery = $myQuery . " GROUP BY id_habitacion, nombre, descricion, ocupacion_maxima, tarifa "; $myQuery = $myQuery . " HAVING count(*) > 0 "; $myQuery = $myQuery . " ORDER BY ocupacion_maxima asc, tarifa desc "; echo $myQuery;
Luego pruebalo directo en la base de datos Sos mi eco? XDD
PD: bromita :P |