Using LIKE CONCAT with wildcard
I'm using the standard LAMP environment. I've taken an example directly
from mysql.com website and adapted it to my table structure.
$sql = 'SELECT cat_name
FROM cats
WHERE cat_name LIKE concat('%', 'Artist', '%') ';
But this does not work... the screen is just blank and even "view source"
in the browser is blank
My issue is that, even though all of the examples I've found on
StackOverflow and other forums use single quotes ('%') it only works if I
use double quotes like this ("%").
No comments:
Post a Comment