|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hi guys,
Am trying to build an online bible search using MySQL & PHP. Well, when a user clicks on a link like 1Peter 1:3, a pop up browser should open and retrieve the the booktitle,chapter,verse respectively. My database schema has three columns i.e booktitle, chapter & verse. Can it be like ../bible?1Peter+1:3? Kim |
|
#2
|
|||
|
|||
|
The problem is that any non-alphanumeric character (spaces, colons, etc) CAN NOT appear in a URL.
You would need to rewrite the PHP code that displays the link to something like this: PHP Code:
I hope this helps. |
|
#3
|
|||
|
|||
|
Thanx penguin.
I tried this PHP Code:
and it worked. There is no problem with it but what if i want to retrieve a range of verses maybe from John to Mark? My database has booktitle,chapter & verse as the fields e.g Read John 1:2 - Mark 2:2 what is the PHP function for retrieving such a query? Hope someone helps |
|
#4
|
|||
|
|||
|
That depends on how your database is organized...
If you don't have numerical ID's for "John" and "Mark" then it's going to be a little more difficult because you can't say: ... IS BETWEEN "John" AND "Mark" ... (Unfortunately for you, MySQL doesn't have a "Biblical" type for sorting...) |
|
#5
|
|||
|
|||
|
Ohh Yes
my database has a unique id for every book i.e Genesis is 01, Exodus 02........etc. How can this help? Kimy_cool |
|
#6
|
||||
|
||||
|
I have an idea of solving this problem on mysql but not in php. Can someone help me pass the parameters in some other or same method mind you the BETWEEN .....AND..safely in PHP?!!
Actually, let say i want to retrieve all bible verses between a this range Ezra 2:2 - 3:18. Below is a working SQL script Quote:
One possible solution i tried though did not work is passing the whole query on the url e.g PHP Code:
Below are the table fields. Quote:
Help most welcome |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Retrieving URL Parameters |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|