How can i put this query to work (it's giving error):
$result = "WHERE attributes like '%"{$GetMarca}"%' ";
I need the double quotes inside the single quotes because i'm searching inside a JSON field named attributes for specific value.
How can i put this query to work (it's giving error):
$result = "WHERE attributes like '%"{$GetMarca}"%' ";
I need the double quotes inside the single quotes because i'm searching inside a JSON field named attributes for specific value.
Try to escape your String.
$result = "WHERE attributes like '%\"" . $GetMarca . "\"%'";
The \ character escape the " character.
explained here in more detail for 'escape': What does it mean to escape a string?