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
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
Originally Posted by NogDog
but i want to know how to make table indexing in my database??? please advise
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
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)