I created a table with a SQL query. If I filter on the referenced value the result is always empty.
The filter is on the "Anbieter" column. (wv_wpdatatable_1.`anbieter`)
SQL-Query:
SELECT wv_wpdatatable_1.`anbieter`, wv_wpdatatable_4.`bezeichnung`, wv_wpdatatable_4.`speicher`, FROM wv_wpdatatable_4 LEFT JOIN wv_wpdatatable_1 ON wv_wpdatatable_4.`anbieter` = wv_wpdatatable_1.`wdt_ID` WHERE wv_wpdatatable_1.`sichtbar` = "Ja" AND wv_wpdatatable_4.`sichtbar` = "Ja"
The root table "wv_wpdatatable_4" column "anbieter" use an Foreign key to the table "wv_wpdatatable_1".
Filtering, sorting, and search may not work properly if you include:
Accent graves ( ` ) around the table name
JOIN functions
UNION functions
CONCAT functions
sub-queries
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″.
yes, filtering is no longer possible. You sad that I should switch to a view because of the "Union" in the SQL statement.
The root column has a value list Value "WordPress", "Joomla", "Typo3", "Drupal". When I save a data record, all values in the table cell are separated by commas.
If I now build a view on this table, I also get a string value back and not the individual values. This means that this field cannot be filtered either.
Sorry for replying so late, due to the holiday break.
- Can you try to open this "view column's" settings again to the Data tab. In there, as you already changed "Possible values for column" from "Read from table on page load" to "Define values list":
But now, if you could delete that existing value which put them all together, as "WordPress, Joomla, Typo3, Drupal" ;
then manually set ( separate) the possible individual values as "WordPress", "Joomla", "Typo3", "Drupal", save changes ;
and check how the filter tab of the column looks after that.
You should be able to set "checkbox, selectbox, multiselectbox" ( optionally with a search if you wish),
- Please contact us further if still not resolved, or any other details you might need.
But I find the solution a bit impractical. If a value is removed from my master table, I always have to adjust all columns in the "Define values list". This is not a consistent database structure. It would be better if your tool takes the content ("WordPress", "Joomla", "Typo3", "Drupal") and splits it into individual values for filtering. In this way you could maintain all values in one table and not have to adjust other tables.
We are going to pass this to our developers, and they will work to implement this in one of the future updates. We don't have an exact ETA, but we will put it on our "To-do" list of improvements to the plugin.
Hello,
I created a table with a SQL query.
If I filter on the referenced value the result is always empty.
The filter is on the "Anbieter" column. (wv_wpdatatable_1.`anbieter`)
SQL-Query:
SELECT wv_wpdatatable_1.`anbieter`,
wv_wpdatatable_4.`bezeichnung`,
wv_wpdatatable_4.`speicher`,
FROM wv_wpdatatable_4
LEFT JOIN wv_wpdatatable_1
ON wv_wpdatatable_4.`anbieter` = wv_wpdatatable_1.`wdt_ID`
WHERE
wv_wpdatatable_1.`sichtbar` = "Ja" AND
wv_wpdatatable_4.`sichtbar` = "Ja"
The root table "wv_wpdatatable_4" column "anbieter" use an Foreign key to the table "wv_wpdatatable_1".
There are a workaround for this filter problem?
Hello Jens
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.
Filtering, sorting, and search may not work properly if you include:
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,
in this case I create views in the database.
Do you have a solution how the view has to be structured to filter a "Value list".
BR
Jens
I forgotten the screenshot.
Hi again Jens
The values are either pulled from the table, or they're manually entered by you.
Either way, those values need to exist as unique values in the table. What issues do you have with this approach? Doesn't it work correctly?
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,
yes, filtering is no longer possible.
You sad that I should switch to a view because of the "Union" in the SQL statement.
The root column has a value list Value "WordPress", "Joomla", "Typo3", "Drupal".
When I save a data record, all values in the table cell are separated by commas.
If I now build a view on this table, I also get a string value back and not the individual values. This means that this field cannot be filtered either.
Additional 3 screenshots to understand the problem.
Hello again, Jens.
Sorry for replying so late, due to the holiday break.
- Can you try to open this "view column's" settings again to the Data tab. In there, as you already changed "Possible values for column" from "Read from table on page load" to "Define values list":
But now, if you could delete that existing value which put them all together, as "WordPress, Joomla, Typo3, Drupal" ;
then manually set ( separate) the possible individual values as "WordPress", "Joomla", "Typo3", "Drupal", save changes ;
and check how the filter tab of the column looks after that.
You should be able to set "checkbox, selectbox, multiselectbox" ( optionally with a search if you wish),
- Please contact us further if still not resolved, or any other details you might need.
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 TMS-Teams,
Thanks your instructions work well.
But I find the solution a bit impractical. If a value is removed from my master table, I always have to adjust all columns in the "Define values list".
This is not a consistent database structure. It would be better if your tool takes the content ("WordPress", "Joomla", "Typo3", "Drupal") and splits it into individual values for filtering. In this way you could maintain all values in one table and not have to adjust other tables.
Best regards
Jens
Hello again, Jens.
- Thank you, that is a very good suggestion.
We are going to pass this to our developers, and they will work to implement this in one of the future updates. We don't have an exact ETA, but we will put it on our "To-do" list of improvements to the plugin.
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