I've tried to create a table from mysql query. the query works fine in phpmyadmin, on the same tables.
When I enter the same query into the table creation it gives error: below.
I've tried it with creating a view, but that also gives similar error.
" Error
cannot calculate position of (2ok) within Union all SELECT 2ok as Megállás_oka, count(2ok) as darab, sum(2p) as össz_idő FROM `l60_allasokok_idok` where date(kezdés_dátum) BETWEEN date('2019-02-26 07:30') and date('2019-03-04 05:00') group by 2ok) as okok_idok group by Megállás_oka"
The query:
"
SELECT Megállás_oka as 'Megok', sum(darab) as 'Esetszám', sum(össz_idő) as 'Összidő' FROM (SELECT 1ok as Megállás_oka, count(1ok) as darab, sum(1p) as össz_idő FROM `l60_allasokok_idok` where date(kezdés_dátum) BETWEEN date('2019-02-26 07:30') and date('2019-03-04 05:00') group by 1ok Union all SELECT 2ok as Megállás_oka, count(2ok) as darab, sum(2p) as össz_idő FROM `l60_allasokok_idok` where date(kezdés_dátum) BETWEEN date('2019-02-26 07:30') and date('2019-03-04 05:00') group by 2ok) as okok_idok group by Megállás_oka
Hi!
I've tried to create a table from mysql query. the query works fine in phpmyadmin, on the same tables.
When I enter the same query into the table creation it gives error: below.
I've tried it with creating a view, but that also gives similar error.
"
Error
cannot calculate position of (2ok) within Union all
SELECT 2ok as Megállás_oka, count(2ok) as darab, sum(2p) as össz_idő FROM `l60_allasokok_idok` where date(kezdés_dátum) BETWEEN date('2019-02-26 07:30') and date('2019-03-04 05:00') group by 2ok)
as okok_idok group by Megállás_oka"
The query:
"
SELECT
Megállás_oka as 'Megok',
sum(darab) as 'Esetszám',
sum(össz_idő) as 'Összidő'
FROM (SELECT 1ok as Megállás_oka, count(1ok) as darab, sum(1p) as össz_idő FROM `l60_allasokok_idok` where date(kezdés_dátum) BETWEEN date('2019-02-26 07:30') and date('2019-03-04 05:00') group by 1ok Union all
SELECT 2ok as Megállás_oka, count(2ok) as darab, sum(2p) as össz_idő FROM `l60_allasokok_idok` where date(kezdés_dátum) BETWEEN date('2019-02-26 07:30') and date('2019-03-04 05:00') group by 2ok)
as okok_idok
group by Megállás_oka
"
Hello Plasmid69.
Can you, please, export the database that contain these tables from PHPMyAdmin and send it to me, so I can try it locally?
Just make sure to enable the Private slider when you respond, so no one else can see it but us.
Best regards.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
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