Jump to content


HELP: Search Engine DB

  • Please log in to reply
2 replies to this topic

#1 Dev_Isos

  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 24 March 2006 - 12:37 PM


I 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 table
2. 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.

#2 ober

  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 24 March 2006 - 02:09 PM

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.

Info: PHP Manual

#3 Dev_Isos

  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 24 March 2006 - 02:34 PM

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.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users