Here is my situation and hopefully you can come up with a simple solution? :)
1) I have example SQL for a table : SELECT concat(101, ID) FROM table
2) this now displays in the table like so:
ID
1011 1012 1013
3) Now, I want to allow a filter so user can search for the displayed records, however, on the ID field, 1011 is not found.
The reason I'm "adding" the 101 is to disguise the ID Number. So the reason is valid, but how do I let people search for this disguised number?
Do you have a work around for that? THANKS!
PS. I thought about having 2 fields in the table: the disguised one and the real ID field, but I don't know how to remove the 101 from the users input, so it could then find/match the real ID?
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 (rarely happens, 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:
Please do not use “LIMIT” in the SELECT statement. wpDataTables adds it automatically and it will be overridden.
Please do not use “ORDER BY” in the SELECT statement. wpDataTables has its own sorting engine so it makes no sense to use MySQL’s sorting, since it will be overridden. Also, server-side processing feature adds this part of statement automatically when users trigger the sorting on the front-end, and having it in initial statement may cause the table to crash.
Sorry, I must have looked at the other ticket before replying to this one.
About this question:
I need to strip off the first two digits of the users typed in number.
I am sorry to disappoint You, but unfortunately this cannot be done with the plugin's built in features.
It would, however, be possible to achieve that with custom code, but please note that customization questions like this one are not covered in the included support for the plugin. Included support covers help with bugs and general inquiries for the plugin features, but not writing custom code. If you need our assistance we can offer you our paid customization service.
I am sorry to disappoint You, but unfortunately, I cannot provide that information either.
As I mentioned before, this would also fall under customization, and questions like this one are not covered in the included support for the plugin. Included support covers help with bugs and general inquiries for the plugin features.
You can take a look in our documentation about Actions and Filters which are defined in wpDataTables plugin for customization's by developers.
Hi,
Here is my situation and hopefully you can come up with a simple solution? :)
1) I have example SQL for a table : SELECT concat(101, ID) FROM table
2) this now displays in the table like so:
ID
1011
1012
1013
3) Now, I want to allow a filter so user can search for the displayed records, however, on the ID field, 1011 is not found.
The reason I'm "adding" the 101 is to disguise the ID Number. So the reason is valid, but how do I let people search for this disguised number?
Do you have a work around for that? THANKS!
PS. I thought about having 2 fields in the table: the disguised one and the real ID field, but I don't know how to remove the 101 from the users input, so it could then find/match the real ID?
Hello Larry.
Sorry for the late response.
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 (rarely happens, 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:
Please try this and let me know if it helps.
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
Hi Aleksandar,
I'm not sure your reply is about my original question?
I was talking about a concept of how to achieve "displaying" an ID field and being able to search for it...
not that there was a table not working?
PS. maybe you looked at another ticket I recently wrote and got confused on which ticket to respond to?
to some up my request:
Is there a way to have user input 12345 (into the search ID field)
AND automatically have wpDataTables search for ID 345.
Meaning, I need to strip off the first two digits of the users typed in number.
thanks
Hello again Larry.
Sorry, I must have looked at the other ticket before replying to this one.
About this question:
I need to strip off the first two digits of the users typed in number.
I am sorry to disappoint You, but unfortunately this cannot be done with the plugin's built in features.
It would, however, be possible to achieve that with custom code, but please note that customization questions like this one are not covered in the included support for the plugin. Included support covers help with bugs and general inquiries for the plugin features, but not writing custom code. If you need our assistance we can offer you our paid customization service.
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
thanks Aleksandar,
so yes, I can write the code (assuming PHP), but "where" would I put the code?
OR how / where do I access the ID field?
If you could point me in the right direction, I'm sure I can do the rest :)
THANKS!
Hello Larry.
I am sorry to disappoint You, but unfortunately, I cannot provide that information either.
As I mentioned before, this would also fall under customization, and questions like this one are not covered in the included support for the plugin. Included support covers help with bugs and general inquiries for the plugin features.
You can take a look in our documentation about Actions and Filters which are defined in wpDataTables plugin for customization's by developers.
Sorry for any inconvenience.
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
FYI. using the View solves my problem :)
as I just change the ID in the view
There You go, Larry, great news!
Thanks for letting me know.
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