Jump to content

Searching Website


proggR

Recommended Posts

I'm about to write up the pseudo code to change my site from text based entry storage to a database and I've just thought of something that I'd like to add now if I could to make things easier. A search bar.

The way the text files work, which is the same way the database will work, is that posts are entered as html files (they have the .php extension but have no php code.. I may change that but don't necessarily need to) and the db/text file stores the filename so that they can be included into the main page. Since I have it setup this way searching it, AFAIK, would be kind of hard. So I was thinking that in my updating page I could just add an extra column in which the code entered is also uploaded and then when I go to search I could use SELECT filename, entry FROM table WHERE entry='%searchterm%' or something to that effect. Since its formatted as an html file would that screw things up with this? Or perhaps theres a way to strip the html tags from it and just upload the content to the db for searches?

Any recomendations would be much appreciated. Thanks.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.