Dude inner join
Dude inner join
rompeplatos
Posts: 20Questions: 4Answers: 0
in Editor
I have this:
program: id, id_sala, text
sala: id, id_congress, text
congress: id, text
And I need this:
SELECT * FROM program INNER JOIN sala ON program.id_sala = sala.id where sala.id_congress=1
When I show all the elements of the table "sala" in the datatable "program"
( https://image.prntscr.com/image/r6tdufxtSSGiJ8j3WedU4A.png )
I only want the sala with "id_congress"="1" When I'm going to make a new program
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
What code are you using to populate the list of options for the
select
list?Allan
in server:
js:
Move your
where
condition into theOptions
instance's chain - e.g.:Note that I've wrapped it in a function. The
Options->where()
method accepts a function that provides access to the underlying query object. Some more information about that is available here.Allan
It´s work fine!
Thank very much!