I want to pass a string placeholder to be included in SQL.
I am enclosing the string in single quotes as %VAR1%.
If I pass ' > 20 ' the code works fine.
But if I pass ' < 20 ' this appears in the SQL as " <; 20 " and this causes a SQL error.
This shortcode does not work: [ wpdatatable id=4 var1=' < 20 ' ]
This problem is reproduced if I put < 20 as the default value for %VAR1% in the placeholder settings. But if I put > 20 as the default value, it works fine.
Is there a bug that prevents ' < ' from being passed in a placeholder? It works fine with ' > 20 '.
Firstly, my apology for the waiting time on this reply. We had our Orthodox Easter holiday break which increased the delay. Thank you very much for your patience.
-
It seems that I am able to partially replicate this issue, but not exactly in the way you described it.
Maybe i discovered a second issue that is tied in with our plugin "removing"/preventing the "<" / less than symbol being in a String Cell, along with this issue of using the VAR1 Placeholder as you described.
-
Can we please take a look at your back-end setup, or if you could maybe provide some screenshots or a Video to show us how the values in your SQL Table look like,
and how does the shortcode look on the "Edit Page"?
-
Did you already have values like this in the table via your Database,
because as you see from my Video in the attachment, i can't even get these values in the table cells.
So i would like to see in more details , what your table is like,
and if you can clarify, if i understand you are trying to pass the VAR1 value as ' < 20 ' through the table shortcode like :
[ wpdatatable id=4 var1=' < 20 ' ]
-
Please provide me a temporary WP-admin (administrator) user for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue.
We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties.
You can write credentials here just check PRIVATE Reply so nobody can see them except us.
Just to be clear, the problem is not that the SQL query is complex (which it happens to be in this case); the (relatively simple) problem is that when %VAR1% is replaced by '< 18' there is a bug in the substitution which adds an extra semicolon to the SQL. It seems to be something to do with the way the '<' is replaced. I think this would be the case even if the SQL query was simple. I guess it is to do with escaping the substitution strings.
Basically, our Placeholders are not made to be used in this way, to replace a part of the SQL Query with a statement.
They are made to completely replace a specific value with another value.
Technically speaking, neither of these variations "should be"/ or rather " is not expected to be" used in this way, so we are pleasantly surprised to see that you managed to successfully use the "greater than" (>) symbol in this use-case.
" If you are using String for Placeholder ‘variable’ %VAR1% should be surrounded with Single Quote ( ‘ ) in the query. "
If you tried like this, you would have your Query look like this
TIMESTAMPDIFF '< 18'
which is not valid, and you are expecting something like this :
TIMESTAMPDIFF < 9
but our Placeholders do not function in this way.
We will still double-check this with our senior developer, just to be safe, but this is the initial advice i got from our developers that checked all the details from your use-case.
Let me know if that makes sense and we will still see if our senior developer has any additional input/advice or correction on the matter.
My apologies, i am just following up on this to advise that the initial advice which our developers provided is the same as the senior developer's input,
he basically just confirmed what they already commented.
I hope that i passed their explanation in a clear way, but we will be here if you have further question on the matter.
And of course, please don't hesitate to open new tickets for any other questions.
I want to pass a string placeholder to be included in SQL.
I am enclosing the string in single quotes as %VAR1%.
If I pass ' > 20 ' the code works fine.
But if I pass ' < 20 ' this appears in the SQL as " <; 20 " and this causes a SQL error.
This shortcode does not work:
[ wpdatatable id=4 var1=' < 20 ' ]
This problem is reproduced if I put < 20 as the default value for %VAR1% in the placeholder settings. But if I put > 20 as the default value, it works fine.
Is there a bug that prevents ' < ' from being passed in a placeholder? It works fine with ' > 20 '.
Hi, Owen.
Firstly, my apology for the waiting time on this reply.
We had our Orthodox Easter holiday break which increased the delay.
Thank you very much for your patience.
-
It seems that I am able to partially replicate this issue, but not exactly in the way you described it.
Maybe i discovered a second issue that is tied in with our plugin "removing"/preventing the "<" / less than symbol being in a String Cell, along with this issue of using the VAR1 Placeholder as you described.
-
Can we please take a look at your back-end setup, or if you could maybe provide some screenshots or a Video to show us how the values in your SQL Table look like,
and how does the shortcode look on the "Edit Page"?
-
Did you already have values like this in the table via your Database,
because as you see from my Video in the attachment, i can't even get these values in the table cells.
So i would like to see in more details , what your table is like,
and if you can clarify, if i understand you are trying to pass the VAR1 value as ' < 20 ' through the table shortcode like :
[ wpdatatable id=4 var1=' < 20 ' ]
-
Please provide me a temporary WP-admin (administrator) user for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue.
We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties.
You can write credentials here just check PRIVATE Reply so nobody can see them except us.
And please send me an URL to this page.
Thank you.
Attached files: LessThan Symbol gets removed as String.mp4
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
Thanks Miloš
Just to be clear, the problem is not that the SQL query is complex (which it happens to be in this case); the (relatively simple) problem is that when %VAR1% is replaced by '< 18' there is a bug in the substitution which adds an extra semicolon to the SQL. It seems to be something to do with the way the '<' is replaced. I think this would be the case even if the SQL query was simple. I guess it is to do with escaping the substitution strings.
Owen
Hi, Owen.
Thank you for this additional clarification, it helps to understand the issue.
I believe that is enough for our 2nd Tier Team, we will also check with our devs if needed.
We will let you know if further access or details are needed.
Thank you for your patience.
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, Owen.
Just wanted to let you know we are still following up on this case.
Our 2nd level Team has been extremely busy, they did not get to it yet;
but i am expecting to get an update very soon.
Our sincerest apology for the waiting time, thank you for your patience.
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, Owen.
Just following up, a small update.
Our 2nd level Team has an idea what the root of this issue might be,
it seems that our SQL Parser 'sanitize' functionality is doing this, due to an "escape character" that gets triggered.
But we don't wish to say the wrong information, so we escalated this with our developers,
they will double-check what is the expected behaviour.
I will let you know if they need any additional access or details from your end along the way,
and going to report back as soon as they advise.
Thank you for your patience.
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, Owen.
Just wanted to let you know we are still following this case.
We had a holiday break, i am expecting to have a response from our Developer Team very soon.
We will advise you as soon as they take a look at everything.
Thank you again for your patience.
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, Owen.
Just wanted to let you know we are still following this case.
Our developers have been extremely busy, but i expect to get an update from them very soon at this point.
Thank you very much for all the patience on this issue.
We will report back immediately as soon as our developers advice.
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, Owen.
We got an update/advice from our developers.
Basically, our Placeholders are not made to be used in this way, to replace a part of the SQL Query with a statement.
They are made to completely replace a specific value with another value.
Technically speaking, neither of these variations "should be"/ or rather " is not expected to be" used in this way, so we are pleasantly surprised to see that you managed to successfully use the "greater than" (>) symbol in this use-case.
As we pointed out in this Documentation,
" If you are using String for Placeholder ‘variable’ %VAR1% should be surrounded with Single Quote ( ‘ ) in the query. "
If you tried like this, you would have your Query look like this
which is not valid, and you are expecting something like this :
but our Placeholders do not function in this way.
We will still double-check this with our senior developer, just to be safe, but this is the initial advice i got from our developers that checked all the details from your use-case.
Let me know if that makes sense and we will still see if our senior developer has any additional input/advice or correction on the matter.
Thank you for your patience once again.
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, Owen.
My apologies, i am just following up on this to advise that the initial advice which our developers provided is the same as the senior developer's input,
he basically just confirmed what they already commented.
I hope that i passed their explanation in a clear way, but we will be here if you have further question on the matter.
And of course, please don't hesitate to open new tickets for any other questions.
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