Get get into field from multiple rows

Questions related to customising nuBuilder Forte with Javascript or PHP.

Get get into field from multiple rows

Postby vanman » Mon Oct 26, 2020 10:58 pm

Hi

I need to get the results of multiple rows of the database into one formated field on a form.

Table is
bible_id
bib_bible_books_id
b_name
b_index
b_book
b_chapter
b_verse
b_nasb
b_nkjv
b_esv
b_isv
b_amp
b_niv

I need all the 'b_esv' rows that belong to a 'b_book' show in one large scrollable field on the form 'bib_bible_books_id' is the unique key for the book.

Thank

Paul
vanman
 
Posts: 22
Joined: Fri Mar 02, 2018 7:39 am

Re: Get get into field from multiple rows

Postby kev1n » Mon Oct 26, 2020 11:41 pm

Hi Paul

Could you upload a screenshot of a sample output what it should look like? (You could use Excel to illustrate it)
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (82)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
 
Posts: 1084
Joined: Mon Oct 15, 2018 2:13 am

Re: Get get into field from multiple rows

Postby vanman » Tue Oct 27, 2020 12:09 am

kev1n wrote:Hi Paul

Could you upload a screenshot of a sample output what it should look like? (You could use Excel to illustrate it)


Hi Kevin

Thanks for the reply

Option 1 is a dump group_concat I added the carriage returns

Option 2 could be useful but needs to be dynamic for each verse

Sample data attached.

btw the way each row has on average 130 characters and the upper group_concat would be 39,500 characters so group_concat may not work

Paul
Attachments
option 1.png
Option 1 group concat
option 1.png (74.55 KiB) Viewed 238 times
option 2.png
option 2
option 2.png (78.69 KiB) Viewed 238 times
sample data.png
Sample data
sample data.png (89.1 KiB) Viewed 238 times
vanman
 
Posts: 22
Joined: Fri Mar 02, 2018 7:39 am

Re: Get get into field from multiple rows

Postby kev1n » Tue Oct 27, 2020 12:27 am

One possibility would be to use PHP and display the output in a html table:
viewtopic.php?f=19&t=10607&start=10#p22121
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (82)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
 
Posts: 1084
Joined: Mon Oct 15, 2018 2:13 am

Re: Get get into field from multiple rows

Postby Janusz » Tue Oct 27, 2020 12:52 am

For long texts html is a good solution, works very fast - and you can easilly display hundreds of pages.
Just an example belowe - it's for different subject but it shows some possibility of it.
https://drive.google.com/file/d/1T5L5_sv1HRWoySVXJ4YIJko-4olD0jci/view?usp=sharing
If you like nuBuilder, please leave a review on SourceForge
Janusz
 
Posts: 399
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: Get get into field from multiple rows

Postby vanman » Tue Oct 27, 2020 10:57 pm

Thank you
vanman
 
Posts: 22
Joined: Fri Mar 02, 2018 7:39 am

Re: Get get into field from multiple rows

Postby admin » Wed Oct 28, 2020 8:23 am

Hey Paul,

How're things?


To get you started I've made a simple database you can use for your Bible stuff.

This is the table structure...

bible.PNG
bible.PNG (123.43 KiB) Viewed 211 times


You'll find a report you can play around with that looks like this...

report.png
report.png (69.55 KiB) Viewed 211 times


Here is the database...

vanman.zip
(113.83 KiB) Downloaded 17 times


Enjoy!


Steven
admin
Site Admin
 
Posts: 3402
Joined: Mon Jun 15, 2009 9:53 am

Re: Get get into field from multiple rows

Postby vanman » Thu Oct 29, 2020 9:49 pm

Hi Steven

Doing well, thank you for your help

Paul
vanman
 
Posts: 22
Joined: Fri Mar 02, 2018 7:39 am

Re: Get get into field from multiple rows

Postby admin » Sat Nov 07, 2020 9:29 am

.
admin
Site Admin
 
Posts: 3402
Joined: Mon Jun 15, 2009 9:53 am


Return to Custom Code



cron