Ver Mensaje Individual
  #3 (permalink)  
Antiguo 17/06/2010, 09:56
Avatar de JuJoGuAl
JuJoGuAl
 
Fecha de Ingreso: julio-2009
Ubicación: Venezuela
Mensajes: 754
Antigüedad: 14 años, 9 meses
Puntos: 19
Respuesta: Filtrar una Busqueda...

Pues no entendi porque la tabla con los 10 campos, no entendi alli, pero lo de la busqueda, es decir yo tengo en el form de busqueda 6 campos. tonces si un campo no se llena al buscar, como tengo un "AND" no me arroja anda porque sera dato y NUL y NULL y NULL...

Entonces quiero que busque segun los campos que han sido ingresados, segun mi criterio y logica tengo que hacer permutaciones donde haga un codigo diferente para cada caso es decir cuando cada campo este lleno...

este es el form de busqueda:
Código PHP:
Ver original
  1. <form method="POST" action="cementerio_buscar.php" onSubmit="return checkform(this)">
  2.                  <table border="0" width="100%">
  3.                         <tr>
  4.                             <td class="texto2" width="20%">Fecha de Inhumacion:</td>
  5.                             <td>                            
  6.                             <input type="text" name="Fentierro" size="20" id="dateDefault1" onKeyPress="return(currencyFormat(this,'/','/',event))"/>
  7.                             </td>
  8.                         </tr>
  9.                  </table>
  10.                  <table border="0" width="100%">
  11.                         <tr>
  12.                             <td class="texto2" width="20%">Nombre y Apellido:</td>
  13.                             <td  width="50%"><input type="text" size="50" name="Nombre"></td>
  14.                             <td class="texto2" width="10%">Edad:</td>
  15.                             <td ><input type="text" size="10" name="Edad"></td>
  16.                         </tr>
  17.                  </table>
  18.                  <table border="0" width="100%">
  19.                         <tr>
  20.                             <td class="texto2"  width="20%">Numero de Boveda:</td>
  21.                             <td  width="10%"><input type="text" size="5" name="Numboveda"></td>
  22.  
  23.                             <td class="texto2" width="15%">Tipo de Boveda:</td>
  24.                             <td width="25%">
  25.                             <select size="1" name="Tipo">
  26.                                         <option></option>
  27.                                         <option>sencilla</option>
  28.                                         <option>doble</option>
  29.                                         <option>infantil</option>
  30.                                         <option>restos</option>
  31.                                         <option>feto</option>
  32.                                 </select>
  33.                             </td>
  34.  
  35.                             <td class="texto2" width="10%">Bloque:</td>
  36.                             <td><input type="text" size="10" name="Bloque"></td>
  37.                         </tr>
  38.                  </table>
  39.                  <BR><BR>
  40.                  <table border="0" width="100%">
  41.                         <tr>
  42.                             <td width="15%"></td>
  43.                             <td width="20%"><input type="submit" name ="submit" value="Buscar"></td>
  44.                             <td width="30%"><input type="reset" name ="clear" value="Limpiar"></td>
  45.                         </tr>
  46.                  </table>
  47.                  </form>
entonces para la busqueda solo debo tomar en cuenta los datos que han sidos ingresados...

Disculpa lo perdido que estoy pero no le veo mas camino...