Corey 0 Report post Posted January 25, 2005 i need a simple script writen in PHP...that searches the MySQL database and finds the word searched in it... here's an example i search for "big" Result: big things happend..... that was abig... big sale on... --------- so i click on one of the options and it directs me to the whole content... i hope you know some script that could help me... see ya;) Share this post Link to post Share on other sites
bjrn 0 Report post Posted January 25, 2005 I'll teach you not only how to implement the search script, I'll teach you how to uncover more knowlegde than you thought possible! Let's see. We have to get something that uses PHP and MySQL and it has to be some sort of search script. I know, lets try Google! We go to https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl and type... oh, I don't know, what about 'php mysql "search script"'? Without the single quotes, but with the dubble quotes. Hmm. You know what, I'm feeling lucky, so I click on the "I'm feeling lucky" button. Wow! A solution! Who would have thought that ten seconds using Google would have given me a solution. It's incredible! Alternatively you could use something like phpDig, which I have no experience with, but am sure is quite advanced. Share this post Link to post Share on other sites
Corey 0 Report post Posted January 25, 2005 mahh...nevermind....but tnx anyway;) Share this post Link to post Share on other sites
nancmu 0 Report post Posted January 28, 2005 TRY THIS... $search_word = "in"; @mysql_connect($host, $user, $mysql_password); $sql = "SELECT * FROM $table_name WHERE field_in_table LIKE '%$search_word%' "; // LIKE, =, != you can learn in phpmyadmin when you try to search in database. // %$search_word% the results are since, inner or win // %$search_word the result is win // $search_word% the result is inner Share this post Link to post Share on other sites
Corey 0 Report post Posted January 28, 2005 i think i understand..tnx;) Share this post Link to post Share on other sites
cragllo 0 Report post Posted January 28, 2005 mahh...nevermind....but tnx anyway;) 43331[/snapback] Why did you say that? I did the same and came up with everything you need to know.... Share this post Link to post Share on other sites
karlo 0 Report post Posted January 28, 2005 Try going to http://www.planetsourcecode.com/Make sure that you really learn the basics of MySQL so that it will be a little bit easy for you. Share this post Link to post Share on other sites