Jump to content

Need help refining a Query


webguync

Recommended Posts

I am working on  Query application which returns results from a MySQL DB. The database consist of players from various sports teams, and list their name, city, sport, etc.

 

The issue is if you type in a search terms from one of the fields any result will return and I only want unique results. For instance if you type in 'New York Giants', you will get a return of all the New York teams, even though I have city and team name in two different columns.  The Query is matching 'New York and returning all results with that in the Query. Anyway here is my SQL code.

 

SELECT sport,first_name,last_name,MVP,city,Picture,team
FROM players 
WHERE MATCH(sport,first_name,last_name,MVP,city,team,Picture)
AGAINST('$query' IN BOOLEAN MODE)");

Link to comment
https://forums.phpfreaks.com/topic/255635-need-help-refining-a-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.