exclude values from mjoin linked table
exclude values from mjoin linked table
HI,
I'm working on something like reservation system; there's a main table containing user data from a web form and an additional table containing 'places' that can be booked per day; the additional table consists of an id, the places-name and a date field. I'm using Mjoin like in this example to link the tables by the places id https://editor.datatables.net/examples/advanced/joinArray.html and this works fine so far.
Now when there's a new user (row) and I want to assing a place to it, all places show up in the editor popup, independent of the date being set in another dataset, but I need to exclude those places that 'are booked', respectively contain a date already.
Is it possible with datatables to exclude those rows from the places table that are booked (contain a date) already? In php/sql I would do it like select * from places where date IS NULL
but I don't know if and how this is done in an MJoin in DT.
Can anybody help?
thanks, martin (and sorry for my english)
Answers
my question is lapsed
What to you mean lapsed? Have you managed to resolve the issue?
From your description, you would need to make an Ajax call to the server to determine what options should be available, and then use that to populate the list of options. The options can be populated with
field().update()
and you could make the Ajax call to get the options when theinitCreate
event happens.Allan
I created a new custom button that opens a custom php page ; in this popup-page I don't use datatables but will code the necessary sql selects and updates manually