Reputation: 2005
Ok, i used "LIKE" with "LEFT JOIN" and it works fine.
$sql = $conn->query("SELECT * FROM tasks t
LEFT JOIN users u
ON t.allowed_countries LIKE u.country
WHERE u.username = '$username'");
but when i'm try to use "LIKE %%" instead of using "LIKE" then it gives me error
LIKE '%" u.country "%'
Can anybody tell me the problem please?
Thank you.
Upvotes: 8
Views: 29992