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!
I'm combining fields using CONCAT in a MySQL query like this:
SELECT db_people.`member_number`,
concat(
db_people.`prefix`, ' ',
db_people.`first_name`, ' ',
db_people.`middle_name`, ' ',
db_people.`last_name`, ' ',
db_people.`suffix`
) as `name`,
db_people.`prefix`,
db_people.`first_name`,
db_people.`middle_name`,
db_people.`last_name`,
db_people.`suffix`,
concat('/person/?people_id=', db_people.`id`) as edit_link
FROM db_people
Whenever I do a search (in the search box, not for a specific field) I get an error that says:
DataTables warning: table id=table_1 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
When looking at the AJAX response, I see it says:
<div id="error"><p class="wpdberror"><strong>WordPress database error:</strong> [Unknown column 'db_people.name' in 'where clause']<br /><code>SELECT SQL_CALC_FOUND_ROWS db_people.`member_number`, concat(db_people.`prefix`,' ',db_people.`first_name`,' ',db_people.`middle_name`,' ',db_people.`last_name`,' ',db_people.`suffix`) AS `name`, db_people.`prefix`, db_people.`first_name`, db_people.`middle_name`, db_people.`last_name`, db_people.`suffix`, concat('/person/?people_id=',db_people.`id`) AS edit_link FROM db_people WHERE (`db_people`.`member_number` LIKE '%g%' OR `db_people`.`name` LIKE '%g%' OR `db_people`.`prefix` LIKE '%g%' OR `db_people`.`first_name` LIKE '%g%' OR `db_people`.`middle_name` LIKE '%g%' OR `db_people`.`last_name` LIKE '%g%' OR `db_people`.`suffix` LIKE '%g%' OR `db_people`.`edit_link` LIKE '%g%') ORDER BY `member_number` ASC LIMIT 50</code></p></div>{"draw":2,"recordsTotal":"4104","recordsFiltered":"8","data":[]}
It looks like you're trying to search for my CONCAT field which is giving an error.
What I'm trying to achieve is to combine fields (i.e. a person's name or a link using an ID). Is there a way to do that without CONCAT? If not, can you fix it so the search doesn't try to search the CONCAT?
Thanks,
Carl
Hi Carl,
Thank you for your purchase.
If your MySQL-query based wpDataTable doesn’t work correctly with server-side processing, probably this is happening because wpDataTables server has problems with parsing of the query and building new queries dynamically (happens rarely, but does sometimes). To avoid this please prepare a MySQL view (a stored query), which will return the data that you need, call it e.g. “view1” and then build a wpDataTabled based on a simple query like “SELECT * FROM view1″.
Please note some this when working with the server-side processing feature:
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
Great tips. I'll try that.
Thanks,
Carl
I just had exactly this problem and creating a View solved it!