![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
30/10/2011, 10:16
|
![Avatar de Ronruby](http://static.forosdelweb.com/customavatars/avatar249338_1.gif) | | | Fecha de Ingreso: julio-2008 Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 16 años, 7 meses Puntos: 416 | |
Respuesta: problema al hacer un filtrado
Código PHP:
Ver original<?php $sql = "SELECT * FROM Peliculas WHERE 1=1"; if(!empty($_POST['pelicula'])){ $sql .= " AND Nombre = '{$_POST['pelicula']}'"; } if(!empty($_POST['genero'])){ $sql .= " AND Genero = '{$_POST['genero']}'"; }
|