Hey everyone!

With the holiday season upon us, we want to share our upcoming working hours:

After that, we’ll return to our regular schedule and assist you as quickly as possible.

In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find tons of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel), which might just have the answers you need while we’re away.

Thanks a bunch for your understanding and support!

Warm regards and happy holidays!

TMS

Okay
  Public Ticket #3493073
query sql not working
Closed

Comments

  • Ian Gorayeb started the conversation

    Hello, I have this query that i use on a php shortcode on worpdress, and it works fine, but when i use it on the charts it only shows the last record of uniques records

    9083264917.png

    Instead of returning the max time of 'hora_interupcion' (11:01) it gives back the last record (10:02)


    Thos is the query generated by the tables wizard and modified by me.


    SELECT coordinador_electrico.`id_evento_cen`,
           coordinador_electrico.`id_comuna`,
           coordinador_electrico.`comuna`,
           coordinador_electrico.`id_region`,
           coordinador_electrico.`hora_interrupcion`,
           coordinador_electrico.`clientes_cortados`
    FROM coordinador_electrico
    WHERE 1=1    AND coordinador_electrico.`id_region` = '9'
       AND coordinador_electrico.`hora_interrupcion` <= CURRENT_TIME()
    GROUP BY coordinador_electrico.`id_comuna`
    ORDER BY coordinador_electrico.`id_comuna`,
    coordinador_electrico.`hora_interrupcion` ASC


  •  1,847
    Miloš replied


    Hi Ian,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    This is a Custom use-case, if i understood you are using the Table shortcode through a PHP code on your WordPress?

    Could you elaborate a bit more how are you implementing that PHP shortcode,

    and if you can show us some screenshots or even better record a Video how you configured all of this,

    and also how doe the table look at the back-end,

    i presume it looks as on your image?


    9083264917.png

    And if I understand, on the Table itself, it looks OK with these 3 rows,

    but on a Chart it just loads the last record ID 138 , the time of 10 : 02, right?

    -

    Can we also take a look at the back-end of the Table and the Chart?

    Please provide me a temporary WP-admin (administrator) user for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. 

    We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties. 

    You can write credentials here just check PRIVATE Reply so nobody can see them except us.

    And please point me to this Table ID,

    and the Chart ID,

    if you can also show me a front end Page where you placed the Chart,

    or maybe the issue shows on the Chart back-end?

    If you can clarify if it's perhaps just front end, or the same as on the back-end of the Chart.

    Thank you.


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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