/    Sign up×
Community /Pin to ProfileBookmark

Help Querying a Strange Database

I have tried writing a query script to display my Bible database like this one:
[URL=”http://www.biblegateway.com/versions/?action=getVersionInfo&vid=49″]http://www.biblegateway.com/versions/?action=getVersionInfo&vid=49[/URL] but nothing I’ve tried works.

I’d like to receive help on this if I could.

Here is a snippit of the sql file I used to set up my database:

[code=php]INSERT INTO bibleasv VALUES (1, 1, ‘Genesis’, 1, 1, ‘verse 1 goes here’);
INSERT INTO bibleasv VALUES (2, 1, ‘Genesis’, 1, 2, ‘verse 2 goes here’);
INSERT INTO bibleasv VALUES (3, 1, ‘Genesis’, 1, 3, ‘verse 3 goes here’);
INSERT INTO bibleasv VALUES (4, 1, ‘Genesis’, 1, 4, ‘verse 4 goes here’);
INSERT INTO bibleasv VALUES (5, 1, ‘Genesis’, 1, 5, ‘verse 5 goes here’);[/code]

Here is the table setup:

[code=php]TABLE -> bibleasv – id, number, book, chapter, verse, text[/code]

All the queries I have tried list the chapter for each verse, so you end up with as many chapters as you have verses in that chapter. And it runs across the screen instead of automatically dropping dow to the next line in the table cell.

I want to show the chapter name in the left cell and the chapters in the right cell linked to a page that will display all the verses in that chapter:

[code=php]<a href=’passage.php?file=$chapter’>$chapter</a>&nbsp;&nbsp;&nbsp;[/code]

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@Alan_PauthorFeb 03.2008 — Sounds like a neat program and one I may look at in the future. But I would have to learn that program and then try to figure out how to write the code to do what I want to do here with php.

Thanks anyway.
×

Success!

Help @Alan_P spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...