Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Associative tables/images/other

Questions related to using nuBuilder Forte.
Post Reply
calhoun1
Posts: 8
Joined: Wed Feb 26, 2020 2:46 am

Associative tables/images/other

Unread post by calhoun1 »

Still a newbie with some basic questions. This is a personal project to play with the application builder and running into some issues. I will go into detail on each and if it is too much ignore but better than you having to come back to ask me for more info. I can also provide the database which is very normalized which I am finding makes this more difficult but want to emulate a real life project so did it the semi correct way. So here it goes.

1. On an object the input type when number or date does not give the format drop down on screen and if you get it looking at pre-established objects it is not populated. This is not a big deal and I have a work around by just updating the zzz table and putting in the info. Just odd that I have loaded multiple versions of this and multiple SQL db’s and all seem to have some glaring issues. Seems almost impossible to get a version of MySQL(mariadb), PHP, etc that all play well on same versions is problematic. This is not a MAJOR issue and have work around.

2. Was creating a gun inventory db for myself and I can provide the DB and examples using my db would be great because every time I try to load others for examples like livedemo and others they seem to never load because of versions or something else. I was expecting to have tabs on the gun like Details (main info), Images (images of gun with captions) and contacts. Contacts can be of type purchased from, given from, sold to or given to by gun. I also have a lot of code tables used in this db. So like on the contacts tab, at a higher level you have already selected a gun and are at the details, images, contacts tab. Contacts table has guns_id and contact_info_key, contact_info had contact_info_id and contact_type_id and contact_type code table with contact type description. I also have other associative tables like gun_caliber that points to caliber table (multiple calibers for a gun) and it has an attribute on the associative table of caliber ignition type id which points to a code table. I have had no success being able to loading any tab besides details. I have watched 10 hours of demos and tried 10 hours of stuff. Tried the #guns_id# on the contacts form query and many other things with no success. Taking my DB and giving an example would be awesome and appreciated
3. Wanted to play with BLOB image stored in DB. I know I should use url and point to images on server. I would love to see an example of both. Have tried to load a demo that shows but never could get any to work. I have an image table that has a guns_id key and image_id. I have an image loaded for gun 1 but can’t get to display any way shape or form. This db will not house over 500 images but would like to seen an example of both ways to show images. File upload and display and display from db. I have spent many hours and just hit dead ends and no good video that I can seem to translate to make it work.

Ok Environment info:

1. Windows 10
2. xampp 3.2.4
3. Mariadb 10.4.11
4. php 7.4.2
5. apache 2.4.41

Thanks for help in advance.
Mike
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Associative tables/images/other

Unread post by kev1n »

Hi,

Can you upload a dump of your database?
admin
Site Admin
Posts: 2822
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times

Re: Associative tables/images/other

Unread post by admin »

calhoun1,
1. On an object the input type when number or date does not give the format drop down on screen and if you get it looking at pre-established objects it is not populated.
2.png
Are you saying you can't see the Format Dropdown Object?

This might help.

https://wiki.nubuilder.cloud/ ... ab_-_Input


Steven
You do not have the required permissions to view the files attached to this post.
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 10 times
Been thanked: 18 times

Re: Associative tables/images/other

Unread post by Janusz »

Mike,
For the pictures download and display in nuBuilder please find enclosed short movie of the working example and as well the copy of the working DB - you can download and run on your computer.
https://drive.google.com/open?id=1G5VOB ... 1pOhITPevQ
DB: https://drive.google.com/open?id=1g5TK7 ... etb_FS6M6G

This is the ad-hoc example extracted from other application I have - so some names in the code might not be relevant to that example - but it's working.
With that you can store thousands of pictures - the only limit is your drive space on the server.
This is just basic example not properly protected/adjusted to the different users (it may happen that double click instead of a single click can make some errors).

To have it working after installing the DB (called TestDB) you have to create on the server folder name: uploads in the main folder where the nuBuilder is installed (with full rights to read and write).
as well in the main nuBuilder folder you need to add the file: savetoserver.php https://drive.google.com/open?id=1MS3qv ... TQAI97R3nf

Concernig importing the DB with phpmyadmin - typically before that process - I am changing the name of the database from original name to the DB name to which I would like to import it.
For example if above database name is TestDB and your database is GunsDB - replace before import in any txt editor - the word TestDB to GunsDB. If not done like that some code or views might not works.
Additionaly in this case I use globeadmin5 as login - if you use globeadmin - you need to change it as well (globeadmin5 to globeadmin) before import.
If you like nuBuilder, please leave a review on SourceForge
calhoun1
Posts: 8
Joined: Wed Feb 26, 2020 2:46 am

Re: Associative tables/images/other

Unread post by calhoun1 »

First I want to say think everyone so much for the information. I want to go thru it all and process. Thanks again and give me a week to get thru and digest and play with it. I will work thru the db loads and samples just getting fewer hours this week. So I want weekend to play with it. I will get back with you with results and statuses.

I uploaded a DB as requested by Kev1n. The name of the upload is backup guninventory 3-9-20 11PM.zip. So I will work thru and come back with questions next week but if anyone looks at this and has suggestions or can show examples on it I will go thru them. Will take me some time to work thru other stuff listed so no rush.

Again I appreciate the quick response and support. Much appreciated and I will get back with results or questions next week.

Mike
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Associative tables/images/other

Unread post by kev1n »

Mike, I can't find a download link.
calhoun1
Posts: 8
Joined: Wed Feb 26, 2020 2:46 am

Re: Associative tables/images/other

Unread post by calhoun1 »

kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Associative tables/images/other

Unread post by kev1n »

I downloaded and set up your db.
calhoun1 wrote: 1. On an object the input type when number or date does not give the format drop down on screen and if you get it looking at pre-established objects it is not populated. This is not a big deal and I have a work around by just updating the zzz table and putting in the info. Just odd that I have loaded multiple versions of this and multiple SQL db’s and all seem to have some glaring issues. Seems almost impossible to get a version of MySQL(mariadb), PHP, etc that all play well on same versions is problematic. This is not a MAJOR issue and have work around.
I can see the format dropdown when I click e.g. the value object but no value/format is chosen in the dropdown.

https://streamable.com/2oo1z
calhoun1
Posts: 8
Joined: Wed Feb 26, 2020 2:46 am

Re: Associative tables/images/other

Unread post by calhoun1 »

Thanks to all of you that I have gotten way further. I have the photos working and many other items. I am moving along but still have one stumbling block with the associative relationship. I can give a example.

A gun can have multiple barrels with multiple calibers. So it can be an over and under with 22lr on top and .410 on bottom and each has a type. It could be center fire on one or it could be a percussion cap if it is black powder. So on the edit of a gun I have a lookup and it shows but having trouble figuring out how to add or update and updating the DB. I assume there will have to be some way to select and it goes to edit versus doing on that screen.

So it is a collection and could have 1 to many barrels with different calibers and an attribute on that table for ignition type.

See the caliber(s) section on the screen. Any help would be appreciated.

Again thanks for all the support.

DB uploaded to: http://s000.tinyupload.com/?file_id=686 ... 5968250413
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 10 times
Been thanked: 18 times

Re: Associative tables/images/other

Unread post by Janusz »

Hi,
What I understood the issue is related to the not working subform.
The original table gun_caliber was missing unique id and there was probably to many restrictions on other fields not allowing to add multiple subform records to the main form.
Please find enclosed example of working table structure.
Przechwytywanie.JPG
Przechwytywanie2.JPG
and the copy of the sql file
https://drive.google.com/open?id=1EEerF ... T9pFqbJC92
You do not have the required permissions to view the files attached to this post.
If you like nuBuilder, please leave a review on SourceForge
Post Reply