Db Related Records listed if row selected
Db Related Records listed if row selected
Nico90
Posts: 18Questions: 7Answers: 0
Hi there,
I have a Table "Products" and I want that if I select a Product on a row, a list appear under it of related Clients Money Offers for that Row Product.
It should looks like this
:
https://i.imgur.com/gjhc8px.png
https://i.imgur.com/apmLRHL.png
Could someone please provide me some code to list the related row offers wich are saved on db?
Thanks in advance,
Nico
This discussion has been closed.
Replies
Looks like you want something like this:
https://datatables.net/examples/api/row_details.html
Kevin
Hi Kevin,
thank you very much, the table is exactly what i was searching for.
Now I have a question: How can i make that products from database are listed and Offers from Clients are listed when row selected?
Thanks,
Nico
In the example the row details are part of the original data returned for each row. It is possible to use ajax to request the data for the child rows. It really depends on your data, what you are returning in the initial response, etc. Please provide more details regarding the data and how you expect to obtain it.
Kevin
Hi Kevis,
thank you very much for your important information, I have this user.php file who is using Datatable to show users who get registered from android app. Let s say me duplicate this file and call it products.php, it will show products from database and if row will selected child rows will show money offers sent from android app and saved on database.
here the user.php:
Thanks,
Nico