D
DAZZ
Guest
Hi, I have a search script in PHP which searches a MYSQL DB table for websites, and what's on them. The current setup is:
'number' the number of the website
'url' the url of the website
'contains' this is where the search script searches in, and its whats on the website.
The searching works great, but I need something to be added to it....
For example, I have the the sites http://www.yahoo.com/ and http://www.php.net/ in the databas, setup like so...
'1' 'http://www.yahoo.com/ 'search, good search engine, the.greatest.search, good.place'
'2' 'http://www.php.com/ 'php, php makers, great.info'
As you see, each 'keyword' is seporated by a comma ',' And when someone searches for, let's say "good"....this would show up...
SITE NUMBER '1'
URL: http://www.yahoo.com
Contains: search, good search engine, the.greatest.search, good.place
it displays that, because the word good is in the contains field of this website
But what im wanting to do is to make it so when someone searches for "good" this will come up...
SITE NUMBER '1'
URL: http://www.yahoo.com/
Contains: good search engine, good.place
What happens is, it takes away everything that doesnt contain "good" in it, it takes away 'search, the.greatest.search'
I know it would be possible, because of the commas ',' just do something with them to make this possible..
Im really new to php, so i dont know anything....
PLease try to help me out, this is important, thank you!!!
If you don't understand something, please tell me, I really need this working!!
Thanks
'number' the number of the website
'url' the url of the website
'contains' this is where the search script searches in, and its whats on the website.
The searching works great, but I need something to be added to it....
For example, I have the the sites http://www.yahoo.com/ and http://www.php.net/ in the databas, setup like so...
'1' 'http://www.yahoo.com/ 'search, good search engine, the.greatest.search, good.place'
'2' 'http://www.php.com/ 'php, php makers, great.info'
As you see, each 'keyword' is seporated by a comma ',' And when someone searches for, let's say "good"....this would show up...
SITE NUMBER '1'
URL: http://www.yahoo.com
Contains: search, good search engine, the.greatest.search, good.place
it displays that, because the word good is in the contains field of this website
But what im wanting to do is to make it so when someone searches for "good" this will come up...
SITE NUMBER '1'
URL: http://www.yahoo.com/
Contains: good search engine, good.place
What happens is, it takes away everything that doesnt contain "good" in it, it takes away 'search, the.greatest.search'
I know it would be possible, because of the commas ',' just do something with them to make this possible..
Im really new to php, so i dont know anything....
PLease try to help me out, this is important, thank you!!!
If you don't understand something, please tell me, I really need this working!!
Thanks