Okay
  Public Ticket #1770500
MYSQL and gravity forms
Closed

Comments

  • rochekaid started the conversation

    Hi,

    I am trying to  create a table generated from multiple gravity forms using a foreign key.  I read that the gravity form addon plugin will not allow me to do this.  

    I was hoping I could instead use the MYSQL table to create a query that would include entries from multiple gravity forms straight from the WP database.  I can't find any support for this method anywhere.  The built-in query generator does not work as it is limited and does not allow for pivot tables.

    Do you happen to know if this method could work or the best place to get support for this?  

    Thanks in advance,

    Rochelle

  •  1,783
    Miloš replied

    Hi Rochelle,
    Thank you for your purchase.


    When you have some "complex" queries our suggestion is to prepare a MySQL view (a stored query), which will return the data that you need, call it e.g. “view1” and then build a wpDataTabled based on a simple query like “SELECT * FROM view1″.

    Please note some this when working with the server-side processing feature:

    • Please do not use “LIMIT” in the SELECT statement. wpDataTables adds it automatically and it will be overridden.
    • Please do not use “ORDER BY” in the SELECT statement. wpDataTables has its own sorting engine so it makes no sense to use MySQL’s sorting, since it will be overridden. Also server-side processing feature adds this part of statement automatically when users triggers the sorting on the front-end, and having it in initial statement may cause the table to crash.


    Best regards.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

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

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables