Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/12/2011, 09:51
Avatar de memoadian
memoadian
Colaborador
 
Fecha de Ingreso: junio-2009
Ubicación: <?php echo 'México'?>
Mensajes: 3.696
Antigüedad: 14 años, 10 meses
Puntos: 641
Respuesta: Como hacer un buscador php por medio de filtro

Da error en el dreamweaver?

es que php debe correr en un server como apache :)

y si aparte el switch esta mal

http://php.net/manual/es/control-structures.switch.php

aqhi dice como usar el switch de php

y entonces quedaría (sujeto a fallos de conpetos) así:

Código PHP:
Ver original
  1. <?php
  2. $filtro = '';
  3. switch ($filtro){
  4.     case 1:
  5.         $filtro.=" AND B.SERV_ENLACE LIKE '%".strtoupper($_POST[''])."'";
  6.     break;
  7.  
  8.     case 2:
  9.         $filtro.=" AND B.SERV_ORDEN LIKE '%".strtoupper($_POST[''])."'";
  10.     break;
  11.  
  12.     case 3:
  13.         $filtro.=" AND E.PROY_NOMBRE LIKE '%".strtoupper($_POST[''])."'";
  14.     break;
  15. }
  16.  
  17. $filtro.=" ORDER BY SLOT_PORT_STM1UMG, SLOT_EQP, PORT_EQP";
  18. ?>