|
|
|
|
![]() ![]() |
Jan 25 2005, 08:16 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 218 Joined: 13-January 05 Member No.: 3,267 |
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;) |
|
|
|
Jan 25 2005, 10:29 PM
Post
#2
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 378 Joined: 8-January 05 Member No.: 3,174 |
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 http://www.google.com/ 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. |
|
|
|
Jan 25 2005, 10:41 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 218 Joined: 13-January 05 Member No.: 3,267 |
mahh...nevermind....but tnx anyway;)
|
|
|
|
Jan 28 2005, 03:40 AM
Post
#4
|
|
|
Advanced Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 136 Joined: 20-October 04 From: Thailand Member No.: 1,840 |
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 |
|
|
|
Jan 28 2005, 10:40 AM
Post
#5
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 218 Joined: 13-January 05 Member No.: 3,267 |
i think i understand..tnx;)
|
|
|
|
Jan 28 2005, 11:02 AM
Post
#6
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 933 Joined: 24-August 04 Member No.: 892 |
QUOTE(Corey @ Jan 25 2005, 10:41 PM) Why did you say that? I did the same and came up with everything you need to know.... |
|
|
|
Jan 28 2005, 12:46 PM
Post
#7
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 618 Joined: 30-October 04 From: Philippines Member No.: 2,049 |
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. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 11th October 2008 - 11:53 PM |