0
私はこのSQLなぜこのIF THEN SQL文はエラーを返しますか?
SELECT *
FROM post
IF 1 = 1 THEN RIGHT JOIN faves ON faves.post_id_fk = post_id; // <== error
END IF;
WHERE post_author_id
LIKE 1
ORDER BY post_timestamp DESC
LIMIT 0, 10
に条件付きright join
を実行するには、これを行うのより良い/正しい方法はありますか?
おかげでeggyal - ソリューション1は、私が探していたものでした – pepe