As previously announced via banners and our newsletters, support is no longer available through this platform.
For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.
You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.
Paid customers: Please log in to your store account for support.
Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com
When creating a new table from an SQL query. I get the below error
There was an error while trying to save the table! OK
Notice: Undefined index: table in /var/www/html/dev/wp-content/plugins/wpdatatables/source/class.wpdatatable.php on line 1638
Notice: Trying to get property 'pos' of non-object in /var/www/html/dev/wp-content/plugins/wpdatatables/source/class.wdtconfigcontroller.php on line 780
{"table":{"_cacheHash":"","connection":null},"error":"Column 'pos' cannot be null"}
Tested the below SQL query in mysql and was able to generate results correctly.
SELECT
IFNULL(grc,'NO GRC') AS grc,
SUM(num_participants) as numparticipants,
SUM(num_participants)/(SUM(SUM(num_participants)) OVER ())*100 AS pcparticipants,
SUM(IFNULL(scj_completed,0)) AS scjcompleted,
SUM(IFNULL(scj_not_completed,0)) AS scjnotcompleted
FROM
(
SELECT
grc,
COUNT(*) as num_participants,
SUM(CASE WHEN scj_status = 7 OR scj_status = 8 THEN 1 ELSE 0 END) as scj_completed,
SUM(CASE WHEN scj_status != 7 AND scj_status != 8 THEN 1 ELSE 0 END) as scj_not_completed
FROM
wp_scj_participants
LEFT JOIN wp_scj_grcmap ON wp_scj_participants.postal_code = wp_scj_grcmap.postalcode
WHERE
scj_status IS NOT NULL
AND (1=1 OR aip_date BETWEEN '%VAR1%' AND '%VAR2%')
GROUP BY
wp_scj_grcmap.grc
) a
GROUP BY grc
ORDER BY num_participants DESC
grcnumparticipantspcparticipantsscjcompletedscjnotcompletedNO GRC6161.0000160JALAN BESAR1111.0000110DUMMY GRC88.000008MARINE PARADE77.000007EAST COAST55.000014ANG MO KIO22.000002ALJUNIED22.000002SEMBAWANG22.000020TANJONG PAGAR11.000001TAMPINES11.000001Hello Alvin
Our logic is based on a PHP SQL parser which has full support for the SQL dialect for the following statement types
SELECT, INSERT, UPDATE, DELETE, REPLACE, RENAME, SHOW, SET, DROP, CREATE INDEX, CREATE TABLE, EXPLAIN and DESCRIBE.
Some of them are disabled for security reasons.
You can try preparing a MySQL view (which will return the data that you need, call it e.g. “view1” and then build a wpDataTables based on a simple query like "SELECT * FROM view1″.
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 Aleksandar,
Do you know which part of the query I provided was causing the error? From what I see the functions I used are not blocked, as I have another query with SELECT, COUNT, SUM, IFNULL.
I can't say exactly what caused the issue, but it could be COUNT(*) or by using GROUP BY.
Please note some this when working with the server-side processing feature:
When working with more complex queries, it's always better to create VIEWs in the database, and then pull them to create a table.
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
Noted on this, we'll try to put that in views if it becomes overly complex.
Thanks Alvin
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
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