Okay
  Public Ticket #1936700
multiple tables on one page or on one form
Closed

Comments

  • Tomaz Kavcic started the conversation

    Hello,

    a few days ago I sent two questions about wpdatatables and wpreportbuilder and both questions were answered with the most generic answer possible as "it's not possible". I hope this won't be the case with this one as well as it's pretty important for us.

    However, the client I'm building the page for bought both wpdatatables and wpreportbuidler plugins and I did both things which were answered as "it's not possible" with just a few simple mysql queries.

    The question we currently have is pretty simple one. Let's say we have two tables: customers (id, name, address, etc.) and orders (id, date, order total) where id is the same in both tables and each customer can have 0, 1, 2, ... x orders. So the question is, how would it be possible or what would be the easiest way to display all orders for one particular selected customer on one single page or inside one single input form?

    I was thinking about two options:

    1. An option to create a simple page with two tables and use of filtering. For instance, in first table you select a customer and then in the second table that same filter is automatically applied (same id), so you can see and edit that customer's orders directly. Is this possible?

    2. If the option above isn't possible, how about putting together an input form where you have an option to edit/insert values to two or more tables simultaneously? For instance, you enter name, address into first table, then click "orders" button for that particular user where second table opens, so you can enter his orders.

    If both options above aren't possible, then please suggest the easiest possible solution to do this. We really need some kind an option to distributa data into two or more tables and be able to access and edit them somehow. Whetever solution posible would be acceptable. Also, if there's really need, we're willing to pay a small amount for this customization to be made, but please integrate it into main version as well as this is really basi functionality and surely useful for more users like us.

    Kind regards, Tomaz.

  •  471
    Isidora replied

    Hi Tomaz,

    Sorry for late response. 

    We are located in Serbia and our working time is from 10:00 to 17:00 CET. business days.

    Unfortunately it is not possible to pass values that users insert form filters or from edit modal  in other or multiply tables with built in features of plugin.

    What you can do is to connect tables with Foreign keys or to made table from custom SQL queries that will return data that you need.

    You can make both tables with SQL queries that depends on of logged in user id (check Placeholders) so when users are logged in the will see forest table with their data and second with their orders. (you will need to have column that contain logged in users id)

    Like I explain you in previous Pre-Purchase ticket this in a  Pre-Purchase category that is intended for customers that didn't buy wpdatatables so far. Because you(or your client) bought wpdatatabls, for future question or issues please open new ticket in wpdatatables category and our support agents will help you out.

    Thank you for understanding.

    Best regards.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  • Tomaz Kavcic replied

    Hello Milan,

    thank you for your reply. However, I think you didn't understand correctly what we need. We actually don't use wordpress users (wp_users) or similar users databases and there will be no logged-in users ever. We just have a simple database with few tables, where one table is filled with customers (name, address, birth_date, etc.) and the other table is filled with orders that were made by specific customers. A great example would be northwind demo database which is widely used for mysql learning.

    I would like to achieve something pretty simple, which is called also "master-detail" sometimes in mysql relations. Please check simple example here:

    http://demo.sqlmaestro.com/feature_demo/master_detail_multiple_details.php

    There are three tables: Country, Language, City. If you select one specific country, you can check Language and City as details for each country, and the values are read from another two tables in this case.

    The same I'd like to do with our Customers (master) and Orders (detail). So, I'd need to display two tables at the same time on one screen. This can't be done with just using "Foreign Key" as there is always different number of orders for each customer (0 to many).

    What would be the easiest option to achieve this, or how much would it cost for you to develop this somehow so it'll look similar or the same as the demo in link above?

    Regards, Tomaz.

  •  471
    Isidora replied

    Hi Tomaz,

    Sorry for disappointment but something like this is not possible with built in features of plugin. 

    Unfortunately, at the moment we don't have available developers which can do this customization for you, because there is a lot of priority task that have to be done in next few months.

    Thank you for understanding.

    Best regards.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables