Slide 15
Slide 15 text
■ joinメソッドが吐くSQL
SELECT
Questions.id AS `Questions__id`,
(中略)
Questions.created AS `Questions__created`,
Questions.modified AS `Questions__modified`,
Answers.id AS `Answers__id`,
Answers.user_id AS `Answers__user_id`,
(中略)
Answers.created AS `Answers__created`,
Answers.modified AS `Answers__modified`,
FROM questions Questions
INNER JOIN answers Answers ON (Answers.user_id = 7 AND Questions.id =
(Answers.question_id));