SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need a Script for PHP MySQL Search

    Have searched the web, these forums, and the script directories, but I can not find a script to do what I want.

    I do not want to code this from scratch. I am looking for either a paid or freeware PHP MySQL Search script.

    Specs:

    I have a MySQL database with 1 table and 7,000 entries of informational data. I simply want to find a PHP Front end script so my users can search the database. Can anyone recommend a script that I can use/customize for this. It should be fairly simple, I just don't want to code from scratch.

    Any recommendations would be most appreciated.

  2. #2
    SitePoint Addict phpster's Avatar
    Join Date
    Feb 2005
    Location
    Toronto, Canada
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, this doesn't give us much

    are you looking for multiple search terms?
    is it fulltext searching you are after or simple varchar type fields?
    is all the data in the same column / table? what does the table look like?
    phpster

    I wish my computer would do what I want it to.
    Not what I tell it to do...

  3. #3
    SitePoint Evangelist djdykes's Avatar
    Join Date
    Feb 2005
    Location
    Chester, Cheshire
    Posts
    565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    $sql = "SELECT * FROM table WHERE col1 OR col2 OR col3 LIKE '%" . $formfield . "%' ";

    or use grep...as described here

    http://www.devpapers.com/article/217

  4. #4
    Brian.Michael Metalish's Avatar
    Join Date
    Nov 2004
    Location
    Virginia Beach, VA
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by djdykes
    $sql = "SELECT * FROM table WHERE col1 OR col2 OR col3 LIKE '%" . $formfield . "%' ";
    Yeah, that looks about right. =) You should look in the manual next time.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •