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!
Hi
I have a table that use a UNION tables.
The table showed as it should, I could edit fields without any problem.
But when I put the short code in a page I receive this error
Notice: Undefined index: FROM in C:xampphtdocswp-contentpluginswpdatatablessourceclass.wpdatatable.php on line 1445
I left the query that Im using for your reference
SELECT `wpav_um_friends`.*, `wpav_users`.`user_nicename` FROM `wpav_um_friends`
INNER JOIN `wpav_users` ON `wpav_um_friends`.`user_id1` = `wpav_users`.`ID`
WHERE `wpav_um_friends`.`user_id2` = %CURRENT_USER_ID%
UNION
SELECT `wpav_um_friends`.*, `wpav_users`.`user_nicename` FROM `wpav_um_friends`
INNER JOIN `wpav_users` ON `wpav_um_friends`.`user_id2` = `wpav_users`.`ID`
WHERE `wpav_um_friends`.`user_id1` = %CURRENT_USER_ID%
looking around to this line $tableName = $parsedQuery['FROM'][0]['table'];
When the query has an UNION key the $parseQuery should be $parsedQuery['UNION'][0]['FROM'][0]['table'];
https://ibb.co/0rqMdM3
Any comment?
this is validation that i did and it seems to work fine. I just want to know from you If it could cause any other problem or not.
/****************************************/
if(isset($parsedQuery['UNION']))
$tableName = $parsedQuery['UNION'][0]['FROM'][0]['table'];
else if(isset($parsedQuery['FROM']))
$tableName = $parsedQuery['FROM'][0]['table'];
/**********************************/
//$tableName = $parsedQuery['FROM'][0]['table']; <-- line 1501
Hello Alejandro
Can you please try adding "UNION ALL" at the end of the query?
Let me know if that works.
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
Hi
What do you mean? LIKE THIS
SELECT `wpav_um_friends`.*, `wpav_users`.`user_nicename` FROM `wpav_um_friends`
INNER JOIN `wpav_users` ON `wpav_um_friends`.`user_id1` = `wpav_users`.`ID`
WHERE `wpav_um_friends`.`user_id2` = %CURRENT_USER_ID%
UNION
SELECT `wpav_um_friends`.*, `wpav_users`.`user_nicename` FROM `wpav_um_friends`
INNER JOIN `wpav_users` ON `wpav_um_friends`.`user_id2` = `wpav_users`.`ID`
WHERE `wpav_um_friends`.`user_id1` = %CURRENT_USER_ID%
UNION ALL
That's right, Alejandro
When using UNION in wpDataTables results in issues, adding "UNION ALL" at the end of the query, like in your example usually does the trick.
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