Dev_Isos Posted March 24, 2006 Share Posted March 24, 2006 HiI want to build a search page for arabic bible verses. I need to create a database for this ... now the script for the search page is not a problem but my problem is in the database. Now ofcourse before I write the script I need to create an admin page so people may help me inserting the bible into the database verse by verse. but as I was considering the search method, it must by word ... so I need another table which will have 3 fields: one for the word ID, another for the verse ID and another for the word itself. So that way, I will enter a verse, that is a whole sentence, into the database using a php admin page. The question is ... how can I do the data entry for once, and have the data entered in two ways:1. Have the verse entered as sentances in the verses table2. Have each word of the verse be entered into the wordsearch table word by word (each word should be inserted in one row).I am simply asking 4 hints ... but if somebody have a full script for that, I will appriciate it. Quote Link to comment Share on other sites More sharing options...
ober Posted March 24, 2006 Share Posted March 24, 2006 Why would you put the words in the verse in a seperate table? That doesn't make any sense. The power of SQL is that you can use things like "LIKE" to look in field contents for specific words. Quote Link to comment Share on other sites More sharing options...
Dev_Isos Posted March 24, 2006 Author Share Posted March 24, 2006 OK ... I've never used the LIKE before ... so I couldn't remember that. I simply checked the search method that phpbb forums uses and it seems the same. they have all the posts in one table refered by the poster and the wordsearch is a different table. I'll try this LIKE thing and thank you very much ... that seems a lot less work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.