on-internet
← Community

JOIN qualifying foreign table rows which might not exist using CodeIgniter's query builder

Stack Overflow ·

I have a table video with fields videoid, genre(int-foreign key), language(int-foreign key), etc. I want to get the value of genre from the genre table and language from the movie_languages table. The structure of tables are given below: video genre movie_languages How can I join these 3 tables to get the language and genre related to each videos in video table. Also, when the user didn't select a genre/language in the form, the value 0 will be inserted as the numeric id in the video table (not NULL). Will this affect the query? I am using CodeIgniter and I tried with the following query, but

Comments

Sign in or sign up to comment and upvote.

No comments yet.