[PHP] Searching a mySQL DB

2002-04-15 Thread Thomas Edison Jr.
I'm working on a search program that searches on a mySQL DB and gives back results. I have a table with a column vProName, which let's say, contains a record Basket Ball Game. Now what i want is that if someone searches for Game or Ball, even then this record should appear. Could someone guide

Re: [PHP] Searching a mySQL DB

2002-04-15 Thread phplists
Check out the MySQL page at http://www.mysql.com/doc/F/u/Fulltext_Search.html. This page talks about doing full-text searches through your data. Then you can implement the queries using PHP scripts to perform the searches.. It works super smooth.. You do have to create an index of any column you

Re: [PHP] Searching a mySQL DB

2002-04-15 Thread Richard Archer
At 4:06 AM -0700 15/4/02, Thomas Edison Jr. wrote: I have a table with a column vProName, which let's say, contains a record Basket Ball Game. Now what i want is that if someone searches for Game or Ball, even then this record should appear. Either select * from ThatTable where vProName like

[PHP] Searching a MYSQL DB

2001-05-23 Thread YoBro
Hi, Any ideas, or any code that will allow a search of specific keywords in a mysql database. Feilds in a Table called: Name Description What I am after is if somebody types the word 'hammer', then I want it to return the results in a list if the word hammer is picked up under the name of

Re: [PHP] Searching a MYSQL DB

2001-05-23 Thread James Holloway
Hey, Simple solution: ? $search = hammer; $connection = // Connection to the database details. $query = @mysql_query(SELECT * FROM table WHERE Name LIKE '%$search%' OR Description LIKE '%$search%' ORDER BY Name ASC, $connection) or die (mysql_error()); while($row =

Re: [PHP] Searching a MYSQL DB

2001-05-23 Thread Miles Thompson
Yes, it's easy and you already have at least one answer. If you are going to be doing any database programming, a basic familiarity with SQL (Structured Query Language) and relational databases is pretty essential. A book like SQL for Dummies is an excellent place to start, you could probably