mysql - using LIKE %% with LEFT JOIN -


ok, used "like" "left join" , works fine.

$sql = $conn->query("select * tasks t                       left join users u                       on t.allowed_countries u.country                       u.username = '$username'"); 

but when i'm try use "like %%" instead of using "like" gives me error

like '%" u.country "%' 

can tell me problem please?

thank you.

use concat % char literal.

like concat('%',u.country,'%') 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -