Problem with a mysql query (like) and php

Jireedips

New Member
i'm trying to use the statement like of sql but unfortunately I get an error every time I use the query. In a php file I have:\[code\]$b = "SELECT Nombre, Link, Img_Pre, Precio, Descripcion, ID, Categoria, Subcategoria FROM Productos WHERE Nombre LIKE \"%$a%\"";\[/code\]but i get this error:\[quote\] 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 '\"%THE VALUE OF A%\"' at line 1\[/quote\]If i try the same statement on phpmyadmin i don't have any error. Why with php I get this error?Thanks!
 
Back
Top