ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Implementing a Custom Search

March 15, 2010 10:43am

Subscribe [4]
  • #1 / Mar 15, 2010 10:43am

    Rene Ruiz

    13 posts

    Hi,

    We have a database we need to search Course Titles & Descriptions for. The current setup, not written by me, goes as follows:

    index.php - contains a simple search form that passes a GET request to results.php

    config.php - Sets up connections to DB and other variables used for SQL Statements. Calls on a separate framework called adodb for its functions.

    results.php - calls on config.php sends SQL Query to DB, returns and formats results into HTML listings of Courses

    detail.php - also calls on config.php queries specific fields (instructor, location, time) in DB for selected course.

    We’re using a setup that is based on the Structure module. And I’m pretty sure I won’t be able to implement this PHP using templates.

    So I’m here looking for some help with direction, I’m not sure if I should be building a plugin or a module for this?

    Thank you in advance for your help.

    Moved to HowTo by Moderator

  • #2 / Mar 15, 2010 10:47am

    Sue Crocker

    26054 posts

    Hi, Rene. This really is more of a HowTo question than a support question. Moving to Howto for additional community support.

  • #3 / Mar 16, 2010 5:21pm

    Rene Ruiz

    13 posts

    Please help.

  • #4 / Mar 17, 2010 3:51pm

    stealth01

    2 posts

    I have a similar kind of issue as well. We just started moving to EE. In our old site, we had a custom search page with basically took user input from one page(index.php), searched over 1000 database entries and displayed the result in final page(results.php).

    Could anyone point me in the right direction as to how to move this over to EE system? I would greatly appreciate your help.

    Thanks much

  • #5 / Mar 17, 2010 4:19pm

    Focus Lab Dev Team

    1129 posts

    I recently turned a podcast “app” (I use that word lightly, it was a very very small app) into an EE plugin that used segments to search the DB (not the EE database, the podcast app database on the same server). I’ll eventually migrate the content into EE but for a temporary solution the Plugin is working quite well. It’s on a site that has Structure installed to if that means anything to you.

    So, I’d suggest creating a plugin unless you need settings to be configurable within the control panel.

  • #6 / Mar 17, 2010 4:33pm

    stealth01

    2 posts

    Hi Erik,
    Thanks for the reply.

    This is what I currently have(non EE site):

    1. Search page(index.php)
      a) Has 5 form fields, with drop-down items and only these can be used to perform a search.

    2. Search page submit to process.php page that takes the parameters from index.php and runs sql LIKE “%lorem%” statement search on a table (with about 1000 entries).

    3. The search result is passed onto result.php page where it is HTML/CSS formatted and displayed (and paginated depending on the number of results).

    Could you suggest a good way of implementing this on a EE site?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases