/ Published in: PHP
Taken from Daniel Mota at
http://icebeat.bitacoras.com/archivo/199/
Expand |
Embed | Plain Text
/* sanitizeTags, version 1.0: http://icebeat.bitacoras.com * (c) 2005 Daniel Mota aka IceBeat <[email protected]> * /*--------------------------------------------------------------------------*/ function sanitizeTags($tags='',$mode=0) { switch ( $del ) { case '+': $new_tags[] = '+'.$tag; break; case '-': $new_tags[] = '-'.$tag; break; default: $new_tags[] = $tag; break; } $words[] = $tag; } } $new_tags[] = $_tags[0]; $words[] = $_tags[0]; } $query = 'WHERE MATCH (tags) AGAINST '.$query; if($mode==1) return $words; return $query; } //ejemplo //$q = 'SELECT * from mitabla '.sanitizeTags('icebeat+web');
You need to login to post a comment.
