I am trying to use the table "wp_users" as a foreign key to display user names on a custom table. However, all I get is the user ID number values.
I know how to do it with other tables but wp_users is not working. See column settings attached. Is the table protected?
The userid column on my custom table is defined as int(11). I am logged in as admin. If I display the users table using shortcode, everything is displayed nicely.
The foreign key is the newest feature that came out with this version of plugin and there are some little bugs which will be fixed for the upcoming version.
Can you please tell me does the column name is the same like the display name for the column that you want to use as a foreign key.
I am trying to display the column name 'display_name' or 'user_email' (tried both). I used the column 'ID' as primary key for users and have a table called 'dienst' which has the column 'userid' defined as a foreign key.
The query looks something like this:
SELECT * FROM wp_users, dienst WHERE wp_users.ID = dienst.userid;
Please provide me a temporary WP-admin login 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 party. You can write
entials here just check Private Reply so nobody can see them except us.
Also please give me the exact table ID and column names from which you want to make this relation so I can try to reproduce the issue.
I tried to create another dropdown field called 'Dauer' in table 'DiensteEintragen' with values from a custom created (using wpDataTable) table. I also do not see any values, the dropdown is simply empty.
Tried changing back what you suggested earlier (main.js and table_config_object.js), still the same. Some single value selectboxes are working, some aren't.
Please provide me a temporary WP-admin login 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 party. You can write credentials here just check Private Reply so nobody can see them except us.
Also point me to the table ID and column names so I can take a look.
Ok now I can see it. It looks like there is some issues with the MySQL tables and foreign keys and I forwarded it to my team so we can test it out further.
In meantime can you please try to create a table like from our documentation so we can be sure that the foreign keys are working on your side.
"Dauer" is set to be float(16,4) in mysql and has to stay this way because my customer needs to enter decimal places.
However, this column isn't a problem. I just noticed the strange behavior and wanted to let you know because this might happen to other customers as well. Let's not worry about this for now.
The problem is that I cannot display and edit user names as foreign keys in my table (see below).
The problem exists on several tables. However, you may want to use table 14 because it's not being used in the front end. Reference table is 11 (users table).
Please note that this is production environment. Do not interfere with any data. Thank you.
The Deuer is set to float as I can see from your post and as I can see when I create a table. Because of that the values can not be return and the proper name of that user is displaying like numbers.
So foreign keys can not be made it if the column type is float.
Hi,
I am trying to use the table "wp_users" as a foreign key to display user names on a custom table. However, all I get is the user ID number values.
I know how to do it with other tables but wp_users is not working. See column settings attached. Is the table protected?
The userid column on my custom table is defined as int(11). I am logged in as admin. If I display the users table using shortcode, everything is displayed nicely.
Thanks for your help.
Johannes
Hi Johannes,
Thank you for your purchase.
The foreign key is the newest feature that came out with this version of plugin and there are some little bugs which will be fixed for the upcoming version.
Can you please tell me does the column name is the same like the display name for the column that you want to use as a foreign key.
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
I am trying to display the column name 'display_name' or 'user_email' (tried both). I used the column 'ID' as primary key for users and have a table called 'dienst' which has the column 'userid' defined as a foreign key.
The query looks something like this:
SELECT * FROM wp_users, dienst WHERE wp_users.ID = dienst.userid;
Hi Johannes
Can you please go to this file:
File ../wp-content/plugins/wpdatatables/assets/js/wpdatatables/admin/table-settings/main.js and around line 854 find this line of code
and replace it with this one
Also in file wp-content/plugins/wpdatatables/assets/js/wpdatatables/admin/table-settings/table_config_object.js around line 635 find this code
and replace it with this one
Let me know the result.
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
I tried it but I still get the same result (see attachment).
It has been working well with other columns in the same table also before I changed the files.
HI Johannes,
Please provide me a temporary WP-admin login 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 party. You can write
entials here just check Private Reply so nobody can see them except us.
Also please give me the exact table ID and column names from which you want to make this relation so I can try to reproduce the issue.
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 Johannes,
Unfortunately Teamviewer or Skype calls are not included in regular support.
Support with such requests can be provided on a paid basis.
Can you please send me the two mysql files so I can try to reproduce the issue on my side.
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
Oh, that's a pity.
What mysql files do you mean?
Here's how I create the table:
Hi Johannes,
I meant that if you can zip that table and send me as and sql file so I can just imported to my database and create it on my side.
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
at the moment, I have an empty dropdown list for users when I edit/create a data set (see attachment)
I tried to create another dropdown field called 'Dauer' in table 'DiensteEintragen' with values from a custom created (using wpDataTable) table. I also do not see any values, the dropdown is simply empty.
Tried changing back what you suggested earlier (main.js and table_config_object.js), still the same. Some single value selectboxes are working, some aren't.
Hi Johannes,
Please provide me a temporary WP-admin login 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 party. You can write credentials here just check Private Reply so nobody can see them except us.
Also point me to the table ID and column names so I can take a look.
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 Johannes,
Ok now I can see it.
It looks like there is some issues with the MySQL tables and foreign keys and I forwarded it to my team so we can test it out further.
In meantime can you please try to create a table like from our documentation so we can be sure that the foreign keys are working on your side.
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
Please escalate this issue to a higher priority because our web project will be delayed if this isn't resolved soon!
Thank you
Hi Johannes,
Can you please tell me which column type is set for that columns (Dauer) in the database.
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
"Dauer" is set to float(16,4) because that's what's recommended by your documentation (but I thought about changing it to float(6,2))
Please escalate this issue to a higher priority because our web project will be delayed if this isn't resolved very soon!
Thank you
Hi Johannes,
When using foreign keys it is recommended to use integer instead of float. You can see that on our video documentation here.
Can you please try to change it to be integer first before you set it to be string and tell me do you still have the same issue.
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 Bogdan,
"Dauer" is set to be float(16,4) in mysql and has to stay this way because my customer needs to enter decimal places.
However, this column isn't a problem. I just noticed the strange behavior and wanted to let you know because this might happen to other customers as well. Let's not worry about this for now.
The problem is that I cannot display and edit user names as foreign keys in my table (see below).
Hi Bogdan,
any update on this issue? This bug is of very high priority to me.
Hi Johannes,
Can you just tell me do you want to just display that users or to be able to edit them also using foreign key.
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 Bogdan,
I'd like to edit them as well (add/edit records and assign them to a certain user, for example).
Johannes
Hi Johannes,
Can you just tell me the ID of the table where you have users and the ID of the table from which you are displaying user's name as a foreign keys.
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 Bogdan,
The problem exists on several tables. However, you may want to use table 14 because it's not being used in the front end. Reference table is 11 (users table).
Please note that this is production environment. Do not interfere with any data. Thank you.
Jottes
HI Johannes,
The Deuer is set to float as I can see from your post and as I can see when I create a table.
Because of that the values can not be return and the proper name of that user is displaying like numbers.
So foreign keys can not be made it if the column type is float.
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 Bogdan,
as I said before, the problem is that the users aren't being displayed (column "Benutzer").
I have already found another solution on the column "Dauer".
Regards
Hi Johannes,
Can you please check now.
I found the issue.
The query for table where are you pulling the values from was like this
select user_email, ID, display_name
from wp_users
where user_status = 0;
You will notice the " ; " sign at the end of the last line
Just remove that sign and you will get the result like I have in wpdatatables support table ID 14 that I created on your site. ( attachment)
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 Bogdan,
yes, this worked. Thank you, that's good to know.
Could you please remove the attachment from your last post? The information is not to be viewed by everyone. Thank you.
Johannes
Hi Johannes,
You are welcome.
Of course, attachment removed.
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