I'm tring to select data from a View instead of from Tables
but I receive an error:
wpDataTables backend error: No data fetched! Rendered query: SELECT * FROM db.vistafatturatoperperiodo
This usually happens when the MySQL query returns an empty result or is broken. Please check the results of the query in some DB manager (e.g. PHPMyAdmin)
Hi Bogdan
I'm tring to select data from a View instead of from Tables
but I receive an error:
wpDataTables backend error: No data fetched!
Rendered query: SELECT * FROM db.vistafatturatoperperiodo
This usually happens when the MySQL query returns an empty result or is broken. Please check the results of the query in some DB manager (e.g. PHPMyAdmin)
Hi riccardoaccetta,
Thank you for your purchase.
Can you please try to make a VIEW in phpmyadmin or any other database management system and see if the query is returning some result.
It looks like that there is no any data in that table that you are trying to pull out the data.
Best regards.
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 | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi Bogdan,
effectively I need to set 2 variables in order to have the view working correctly
but if I put the following SQL on the page I have an error:
SET @dataInizioRiepilogoFatturato = '2017-01-01';
SET @dataFineRiepilogoFatturato = '2017-07-31';
SELECT vistafatturatoprimaattestazioneperperiodo.nomeAbbreviato, vistafatturatoprimaattestazioneperperiodo.PrimaAttestazione, vistafatturatorevisionetriennaleperperiodo.RevisioneTriennale,
vistafatturatorinnovoperperiodo.Rinnovo, vistafatturatovariazioneperperiodo.Variazione
FROM vistafatturatoprimaattestazioneperperiodo INNER JOIN
vistafatturatorevisionetriennaleperperiodo ON vistafatturatoprimaattestazioneperperiodo.nomeAbbreviato = vistafatturatorevisionetriennaleperperiodo.nomeAbbreviato INNER JOIN
vistafatturatorinnovoperperiodo ON vistafatturatorevisionetriennaleperperiodo.nomeAbbreviato = vistafatturatorinnovoperperiodo.nomeAbbreviato INNER JOIN
vistafatturatovariazioneperperiodo ON vistafatturatorinnovoperperiodo.nomeAbbreviato = vistafatturatovariazioneperperiodo.nomeAbbreviato
Hi riccardoaccetta,
Is there anything more in that error or it is just
No data fetched!
Rendered query: SELECT * FROM db.vistafatturatoperperiodo
anymore text or description.
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 | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi Bogdan,
basically before making the query I need to set 2 parameters
SET @dataInizioRiepilogoFatturato = '2017-07-01';
SET @dataFineRiepilogoFatturato = '2017-07-31';
this two parameters are then used in the view with a function FUNZIONEDATAINIZIORIEPILOGOFATTURATO()
the problem is that I have to make it dynamically in wpdatatable.
Is there a way to do it ?
Thanks
Best Regards
Riccardo Accetta
Hi Riccardo Accetta,
Sorry to disappoint you but unfortunately variables in mysql queries are not supported.
But you can use placeholders.
You can take a look at our documentation about placeholders here.
Hope this can help.
Best regards.
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 | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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