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 #1529336
MySQL query
Closed

Comments

  •  1
    Harry started the conversation

    Building this query and works perfectly fine in MySQL sandbox:

    SELECT r.`p1_timestamp`, `p1_meterreading_in_1`, `p1_meterreading_in_2`, `p1_meterreading_out_1` , `p1_meterreading_out_2`, `p1_channel_1_meterreading`, `p1_channel_2_meterreading` FROM p1_log AS r JOIN (SELECT MAX(t.p1_timestamp) AS p1_timestamp FROM p1_log AS t GROUP BY YEAR(t.p1_timestamp), MONTH(t.p1_timestamp)) AS x USING (p1_timestamp) ORDER BY p1_timestamp ASC

    Building wpDataTable give following error:

    cannot calculate position of within p1_log AS r JOIN (SELECT MAX(t.p1_timestamp) AS p1_timestamp FROM p1_log AS t GROUP BY YEAR(t.p1_timestamp), MONTH(t.p1_timestamp)) AS x USING (p1_timestamp) ORDER BY p1_timestamp ASC

    Just want to understand what is going wrong.

  •  472
    Isidora replied

    HI harry440,
    Thank you for your purchase.

    If your MySQL-query based wpDataTable doesn’t work correctly with server-side processing, probably this is happening because wpDataTables server has problems with parsing of the query and building new queries dynamically (happens rarely, but does sometimes). To avoid this if your query is working in phpmyadmin or other tool that you use, please 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″.

    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