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 would like to fetch users of specific role in wpdatatables. I have several custom fields that has to be fetched as well. I tried to fetch from mysql database but it doesn't help in fetching custom fields. So, I chose to fetch it from PHP serialize method, but for some reasons it doesn't happen. It would be great if you can help me in doing it.
Thanks in advance.
Arun Yogesh.
Hi,
I have managed to get it done by MySQL. Below is the code:
SELECT
wpu6_users.display_name AS n_user_display_name,
t1.meta_value AS n_user_first_name,
t2.meta_value AS n_user_phone,
wpu6_users.user_email AS n_user_user_email,
t3.meta_value AS n_user_address_1,
t4.meta_value AS n_user_address_2,
t5.meta_value AS n_user_area,
t6.meta_value AS n_user_city,
t7.meta_value AS n_user_state,
t8.meta_value AS n_user_country,
t9.meta_value AS n_user_postcode
FROM wpu6_users
LEFT JOIN wpu6_usermeta AS t1 ON t1.user_id = wpu6_users.ID
LEFT JOIN wpu6_usermeta AS t2 ON t1.user_id = t2.user_id
LEFT JOIN wpu6_usermeta AS t3 ON t2.user_id = t3.user_id
LEFT JOIN wpu6_usermeta AS t4 ON t3.user_id = t4.user_id
LEFT JOIN wpu6_usermeta AS t5 ON t4.user_id = t5.user_id
LEFT JOIN wpu6_usermeta AS t6 ON t5.user_id = t6.user_id
LEFT JOIN wpu6_usermeta AS t7 ON t6.user_id = t7.user_id
LEFT JOIN wpu6_usermeta AS t8 ON t7.user_id = t8.user_id
LEFT JOIN wpu6_usermeta AS t9 ON t8.user_id = t9.user_id
WHERE t1.meta_key = 'billing_first_name'
AND t2.meta_key = 'billing_phone'
AND t3.meta_key = 'billing_address_1'
AND t4.meta_key = 'billing_address_2'
AND t5.meta_key = 'mv_area'
AND t6.meta_key = 'billing_city'
AND t7.meta_key = 'billing_state'
AND t8.meta_key = 'billing_country'
AND t9.meta_key = 'billing_postcode'
Now I am trying to display users based on role. Can anyone suggest the best way to do it in MySQL?
Any help is greatly appreciated.
Thanks in advance.
Hi Arun Yogesh,
Thank you for your purchase.
We are glad that you found the solution,good job.
If you have any more issues feel free to open a new ticket, we will gladly 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
Hi,
Additionally, help me in retrieving users based on role using below MySQL query.
SELECT
wpu6_users.display_name AS n_user_display_name,
t1.meta_value AS n_user_first_name,
t2.meta_value AS n_user_phone,
wpu6_users.user_email AS n_user_user_email,
t3.meta_value AS n_user_address_1,
t4.meta_value AS n_user_address_2,
t5.meta_value AS n_user_area,
t6.meta_value AS n_user_city,
t7.meta_value AS n_user_state,
t8.meta_value AS n_user_country,
t9.meta_value AS n_user_postcode
FROM wpu6_users
LEFT JOIN wpu6_usermeta AS t1 ON t1.user_id = wpu6_users.ID
LEFT JOIN wpu6_usermeta AS t2 ON t1.user_id = t2.user_id
LEFT JOIN wpu6_usermeta AS t3 ON t2.user_id = t3.user_id
LEFT JOIN wpu6_usermeta AS t4 ON t3.user_id = t4.user_id
LEFT JOIN wpu6_usermeta AS t5 ON t4.user_id = t5.user_id
LEFT JOIN wpu6_usermeta AS t6 ON t5.user_id = t6.user_id
LEFT JOIN wpu6_usermeta AS t7 ON t6.user_id = t7.user_id
LEFT JOIN wpu6_usermeta AS t8 ON t7.user_id = t8.user_id
LEFT JOIN wpu6_usermeta AS t9 ON t8.user_id = t9.user_id
WHERE t1.meta_key = 'billing_first_name'
AND t2.meta_key = 'billing_phone'
AND t3.meta_key = 'billing_address_1'
AND t4.meta_key = 'billing_address_2'
AND t5.meta_key = 'mv_area'
AND t6.meta_key = 'billing_city'
AND t7.meta_key = 'billing_state'
AND t8.meta_key = 'billing_country'
AND t9.meta_key = 'billing_postcode'
Hi Arun,
Please be advised that preparing MySQL queries for you is not included in plugin support, included support covers help with bugs and general inquiries for the plugin features, but requests like this can be done as a paid customization service. I can not write query for you because it is a policy of the company and it will be unfair to other customers that have similar requests.
I can point you out to make a table using our wpdatatables constructor but there are some limitations.
If you take a look at our documentation you can see that wpDataTables Constructor is just a helper:
"Please note that WPDB query constructor is not an ultimate query generator, it just constructs a suggestion of a query. We constantly work on improving it, but SQL is such a complicated and flexible language that full automation for constructing queries is hardly possible. So the more complicated the query is, the higher is the chance that it will not return exactly what you need. So play around with the resulting query."
Thank you for understanding.
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