RE: [PHP] array problem

From: Date: Mon, 13 Nov 2000 17:07:47 +0000
Subject: RE: [PHP] array problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-24981@lists.php.net to get a copy of this message
please ignore this now... I am going to upgrade my mysql to 3.23 and use the native FULLTEXT to do the work for me. -----Original Message----- From: Michael Geier [mailto:mgeier@cdmsports.com] Sent: Monday, November 13, 2000 10:53 AM To: php-general@lists.php.net Subject: [PHP] array problem I am trying to create a weighted search routine against a mysql db. I explode my search criteria and search against each word currently (I realize that complete phrases should weight higher; worry about that later). While ($searchphrase = mysql_shift($exploded_criteria)) { $result = query("select FIELDS from TABLE where MEMOFIELD like '%$searchphrase%'",$db); // how do I combine this array with results from previous/future queries? } ie. (fictional data/results) searching for "my dog spot" select rowid,memo from TABLE where MEMOFIELD like '%my%' (returns 2 rows) select rowid,memo from TABLE where MEMOFIELD like '%dog%' (returns 14 rows) select rowid,memo from TABLE where MEMOFIELD like '%spot%' (returns 1 row) merge arrays newarray (17 x 2) (rowid, memo) Any hints? Thanks. Michael Geier mgeier@cdmsports.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#24981) next »