I wants to search the multiple keywords from mysql & php.
For Ex:
$search = "best beaches in india";
$replace_spaces = str_replace(" ","|",$search);
$sql_query = mysql_fetch_array(mysql_query("SELECT * FROM table_name WHERE table_search_field REGEXP '".$replace_spaces."'"));
print_r($sql_query);
$replace_spaces = str_replace(" ","|",$search);
$sql_query = mysql_fetch_array(mysql_query("SELECT * FROM table_name WHERE table_search_field REGEXP '".$replace_spaces."'"));
print_r($sql_query);
No comments:
Post a Comment