scrollmapper / bible_databases

Bible versions and cross-reference databases.
977 stars 346 forks source link

Random Verses #48

Closed cypriotxx closed 2 years ago

cypriotxx commented 3 years ago

needing some advice please , using php , want to display random verses from the bible book there is 66 books and 1,189 chapter and 31,102 verses in total , we would like to use the numbers based on the numbers 3, 7, 12, and 40 when randomly showing until the script stopped , so we will have a start and stop button and each time should start at a random place totally different and follow the numbers pattern we want and mark the verses until we click the stop button to display the verse that is stopped at ...

what we would like it to happen is that on when someone clicks on Start it would use the numbers we would like it to go through the verses until user clicks to stop it again and it would show the verse that is stopped at , so if there is 7 users or more running the script the same time they should all get different results from different books etc etc but based on same wanted base numbers hope that make sense

any help will be great thank you in Jesus name,

God Bless "Jesus Loves You" "For I know the plans I have for you,” declares the Lord, “plans to prosper you and not to harm you, plans to give you hope and a future." Jeremiah 29:11

michael-garofalo commented 3 years ago

any help will be great thank you in Jesus name

I just wandered over to this GitHub project to report a possible issue. That's when I saw this unanswered post. So, I figured... you did say "any" help... and no one else replied... so here's some mustard seed sized help. 😄

needing some advice please , using php

This is where I get confused right away. I'm trying to figure out your requirements and I'm not sure that PHP is the best language. It's not just random hate of PHP either. I like PHP.

we would like to use the numbers based on the numbers 3, 7, 12, and 40 when randomly showing until the script stopped

I'm not sure why those numbers are important. 3 is not a multiple of 31,102... neither is 7, 12, or 40. So, I'm not exactly sure how you're imagining the shuffling to work. In particular, I'm not sure if it's just random numbers that are shown, or if it's random bible verses. The latter is one of the reasons why I question the use of PHP. If the verses are shown randomly... every few seconds... or even every few milliseconds... I imagine that would be tough on the server.

It seems like you're trying to build an online bible study game.

If things are only shuffling locally, until a player presses a button, maybe PHP could do the job, but then the other players would have to constantly hit the server waiting for an update — not efficient.

I don't know what's best for you to do. This reply is merely just to tell you how I'm reacting to these requirement. If I'm understanding this correctly, the project is game-like, with more than a few people playing simultaneously. That makes me think of socket.io...

https://socket.io https://github.com/socketio/socket.io

Socket.IO enables real-time, bidirectional and event-based communication. It works on every platform, browser or device, focusing equally on reliability and speed.

Maybe that's what you're looking for? 🤔

While that software seems nice, I haven't actually used it... not yet at least. This might not be the most helpful information, but I find that development projects are often deceptively challenging. There are some complex ideas involved in this project. I think a good next step could be to define the requirements in detail. Then, maybe those requirements can be split up into more manageable parts.

Hopefully that's helpful information.

scrollmapper commented 3 years ago

I only check scrollmapper once in a great while since its a very basic project and, thankfully, the bible never changes :D

There are ways to write random select statements in SQL, but I'll definitely leave this open for more qualified people to help.

God bless you as well.

esurmay commented 3 years ago

Not necessarily it has to be in TSQL. Every programming language has methods that allows you to do what you need. It’s a logic matters.

cypriotxx commented 3 years ago

not the best with programming coding etc , The idea is to have a button would shuffle in between the scriptures based on God's numbers and show one when clicked again thats all , if there is a formula for this it wont matter really if it is php or not :) Thank you so much for all taking time to write really appreciated

God Bless "Jesus Loves You" "For I know the plans I have for you,” declares the Lord, “plans to prosper you and not to harm you, plans to give you hope and a future." Jeremiah 29:11

On Sun, 6 Dec 2020 at 19:50, Roger E Surmay notifications@github.com wrote:

Not necessarily it has to be in TSQL. Every programming language has methods that allows you to do what you need. It’s a logic matters.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/scrollmapper/bible_databases/issues/48#issuecomment-739553670, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIPJVR35P6VIUZGAF2KVP6LSTPN6TANCNFSM4TZAGXPA .

esurmay commented 3 years ago

I know what you mean. I did exactly what I said before. I had a button which fired a event and brought me Randon scriptures. I used qml at that time (5 years ago) for blackberry app. So, nowadays there are a lot of ways to do that.