Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/12/2008, 11:12
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años, 9 meses
Puntos: 2135
Respuesta: Condicion en SELECT.

Mmmm y si agrupas tu consulta:
Código php:
Ver original
  1. <?php
  2. //BUSCAR SI HAY 1 PALABRA
  3.  
  4. $resultado="select titulo,categoria,cuerpo,imagen,web FROM registros WHERE (estado='activo') and (cuerpo LIKE '%$busqueda%' OR categoria LIKE '%$busqueda%' OR titulo LIKE '%$busqueda%' OR web LIKE '%$busqueda%') LIMIT $inicio,10 ";

Saludos.