好吧,我使用"LIKE"和"LEFT JOIN",它运行正常.
$sql = $conn->query("SELECT * FROM tasks t
LEFT JOIN users u
ON t.allowed_countries LIKE u.country
WHERE u.username = '$username'");
Run Code Online (Sandbox Code Playgroud)
但是当我尝试使用"LIKE %%"而不是使用"LIKE"时,它会给我错误
LIKE '%" u.country "%'
Run Code Online (Sandbox Code Playgroud)
请问有人告诉我这个问题吗?
谢谢.