Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/06/2009, 07:43
Gaug
 
Fecha de Ingreso: junio-2009
Mensajes: 250
Antigüedad: 14 años, 10 meses
Puntos: 1
Problema de sintaxis con 'SELECT'.

Hola a todos.

Estoy manejando arrays, y quiero usar un array en un select, pero me marca éste error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'like 'valordelarray' order by llave ASC limit 0,1' at line 1

Aunque no estoy manejando el array directamente en el 'SELECT', lo estoy haciendo algo así:

Código PHP:
$sintaxis=$data[0]."%";


  
$query_Recordset "SELECT * from reg_obra like '".$sintaxis."' order by llave ASC limit 0,1"
Espero puedan ayudarme, gracias de antemano.

Saludos.