We're Moving to a New Support Platform – Starting June 1st!

We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.

You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.

While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.

We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.

Thanks for your continued support and trust – we’re excited to bring you an even better support experience!

Okay
  Public Ticket #2319215
SQL query available on manual table
Closed

Comments

  • Emiel Lelieveld started the conversation

    Dear,

    Just testing the Wptable on your demo site.

    I was making a manual table and then wanted to use a SQL query to filter, but I do not get the SQL window, this window only shows when I select a SQL tabel.

    Any how, I would like to create a or multiple tables (manual or SQL)  to show conference room usage. I like to have a display (page) to show only the table Monday on a Monday etc. So I make 5 tables for each day of the week or I add a column with the day of the week and use that in my filter. Can this be done , or perhaps you can suggest a better way.

    I was thinking to use SQL to compare current day with day in the table ?


     

  •  2,576
    Aleksandar replied

    Hello Emiel

    Thank you for your interest in our plugin.

    When you create a manual table, it is saved in the database in format: wp_wpdatatable_#, where "#" represents the table's ID in the database. You can see this ID when you go to the "Editing" tab above the table, and enable editing.

    Then, you can do what you want with it through SQL Query based tables. You can pull the data into new wpDataTables like:

    SELECT * FROM wp_wpdatatable_3

    Or like:

    SELECT column1, column2, column5 from wp_wpdatatable_3
    WHERE columnID = %CURRENT_USER_ID%

    if you wish to show the data of the table associated only to the currently logged in user.

    Following the same logic, you can create 5 different tables for 5 days of the week:

    SELECT column1, column3, column5 FROM wp_wpdatatable_3
    WHERE column1 = 'Monday'

    Unfortunately, using curdate() or anything similar goes for the date, not the day.

    Kind Regards, 

    Aleksandar Vuković
    [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