dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: search system using php mysql

  1. #1
    Join Date
    Sep 2008
    Posts
    206

    search system using php mysql

    please i want to make a search system for my website

    i have 2 ideas
    1- the first one is to search in my phpmyadmin tables and columns but it takes a very long time to get result

    2- my second idea is to make an XML file using cron job and search in it when the user press search..

    can anyone tell me which idea is better?? and if anyone has another idea please advice

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,614
    When you say "search in my phpmyadmin" tables, do you really mean search your MySQL database tables? (phpMyAdmin is just a web-based tool for working with MySQL, but presumably your web app would not be using phpMyAdmin, and instead interfacing directly with MySQL.) Assuming that's the case, if it's too slow, it's probably because you have not properly optimized things in terms of DB design, indexing, and query optimization -- and possibly making use of FULLTEXT column indexes using the INNODB table type for searching text columns.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Sep 2008
    Posts
    206
    Quote Originally Posted by NogDog View Post
    When you say "search in my phpmyadmin" tables, do you really mean search your MySQL database tables? (phpMyAdmin is just a web-based tool for working with MySQL, but presumably your web app would not be using phpMyAdmin, and instead interfacing directly with MySQL.) Assuming that's the case, if it's too slow, it's probably because you have not properly optimized things in terms of DB design, indexing, and query optimization -- and possibly making use of FULLTEXT column indexes using the INNODB table type for searching text columns.
    yes i mean mysql database.. sorry for this interruption

    but i want to know how to make table indexing in my database??? please advise

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,614
    In a nutshell, any column that is used in a WHERE, ON, GROUP BY, or ORDER BY clause should have an index on it (index, unique, or primary key). Additionally, MySQL supports a special FULLTEXT index you can use on TEXT columns, and to which you can apply specific functions useful for searching that text: http://dev.mysql.com/doc/refman/5.0/...xt-search.html

    For lots more info on optimization: http://dev.mysql.com/doc/refman/5.0/...imization.html
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles