[eluser]Loquela[/eluser]
Hi there,
Wondering if anybody could suggest the most elegant way to translate the following SQL statement using CI Dtabase classs?
I know I can just use $this->db->select("SELECT...") but I am trying to get to grips with all the CI functions would like to try some alternatives. Cheers in advance!
Code:
SELECT topics.topic_id, topics.topic, topic2subject.topic_id, topic2subject.subject_id
FROM topics
Inner Join topic2subject
ON topic2subject.topic_id = topics.topic_id
WHERE topic2subject.subject_id = %s
ORDER BY topic
L.