Page 4 of 4
Re: Foreign Key Display
Posted: Mon Jun 03, 2019 5:25 pm
by Alohajoe5
I have now got the view to be "viewable" by nuBuilder. I cannot, however, seem to "Insert" a new record. IDK If this is related to this solution being a view and limited to editing only one of the tables involved per save operation.
Re: Foreign Key Display
Posted: Mon Jun 03, 2019 5:48 pm
by Janusz
Hi, please find enclosed the copy of the database I was making trial - and it works well on my configuration.
https://drive.google.com/open?id=1RfQjX ... UbM7s0dwdD
and some movie from settings:
https://drive.google.com/open?id=1TdcBR ... rn7FcpTYz3
Some remarks:
I use Signal_1 as column name not Signal for which I received a worning that this name is restricted by DB.
When using different databases on one browser - make sure the after closing one database and opening the new one you need to fully close all the browser windows - otherwise some data are kept in browser and behaviour can be strange.
For Import / Export operations with phpmyadmin - keep in mind that it woks up to 2MB - so it's better to practise from the beginning saving by DB directly for example on linux I use following (just any exaple):
Code: Select all
to export
mysqldump --events -u root -pyourpsw CTbaza > /root/temp/CTbazacopy.sql
to import
mysql -u root -p....... -e "DROP DATABASE CTbaza;CREATE DATABASE CTbaza;GRANT ALL PRIVILEGES ON CTbaza.* TO 'globeadmin'@'%';"
mysql -u root -p...... CTbaza < /root/temp/CTbazacopy.sql
Re: Foreign Key Display
Posted: Mon Jun 03, 2019 6:04 pm
by Janusz
Addionally I check - so this view is working for modification (one table per save operation) - but with that you can not add record.
I my databases when I want to add record I am always working directly with form linked to table (never view) - maybe sometimes it would be possible - but personally I prefer not.
You can find example how it can be done - just one post belowe - I sent few days ago to Ingar.
Re: Foreign Key Display
Posted: Mon Jun 03, 2019 6:36 pm
by Janusz
Re: Foreign Key Display
Posted: Mon Jun 03, 2019 6:50 pm
by Janusz
and with the view I can see - it can be used as well - with no issue - pay attention to table and view settings.
Make sure that in DB all the field are set to allow saving in case of empty fields (set null fro example)
https://drive.google.com/open?id=12P-DL ... ykbUhROnhJ
Re: Foreign Key Display
Posted: Tue Jun 04, 2019 7:36 am
by Janusz
Re: Foreign Key Display
Posted: Tue Jun 04, 2019 6:48 pm
by Alohajoe5
Janusz,
Thank you for the help. I'm still trying to get the display working with a proper join instead of a view. I'm treating the view as a backup--I've got one up and working like you've described, but the drawback being the inability to insert necessitates having that second form setup for inserting & editing. I also discounted 'denormalizing' the data. I'm going to try to see what other ways I can affect a join and see if we can't get nuBuilder to 'like' the SQL. That's my project for today. I'll keep you posted.