All pastes #920886 Raw Edit

nebmo

public text v1 · immutable
#920886 ·published 2008-02-27 18:03 UTC
rendered paste body
$cuisine = mysql_real_escape_string( $_GET['cuisine'] );
$sql = "SELECT DISTINCT * FROM listings_food WHERE MATCH (cuisine) AGAINST ('$cuisine' IN BOOLEAN MODE)";

// If i search for example 'American,Sushi' row 'A' will appear twice:
// A = American,Sushi,Steak
// B = Sushi,American
// C = American


 SELECT DISTINCT *
FROM listings_food
WHERE MATCH (
cuisine
)
AGAINST (
'American,Steakhouse/Grill'
IN BOOLEAN
MODE
)
LIMIT 0 , 30 


shows:

Full Texts  	rid 	bestfor 	cuisine 	priceguide_from 	priceguide_to 	supervision 	category
	Edit 		1 	  	Israeli,Traditional,Steakhouse/Grill 	  	  	  	m
	Edit 		86 	  	American,Steakhouse/Grill 	  	  	  	 
	Edit 		41 	  	American,Pizza 	5 	10 	KDS 	dp