Hello,
I made this original post here
http://forums.mysql.com/read.php?10,73371,73371#msg-73371 but got no answers so far... (4 days). The request seems to better fit in this forum. Here it is :
I made substantial progress and the function is 99% done now, but we have ONE little problem with the FULLTEXT part... :-(
I now have the following request that works really fine :
SELECT alertes.*, annonces.ann_id, count(annonces.ann_id) AS nba FROM alertes, annonces
WHERE
annonces.rub = alertes.al_rub AND
IF (alertes.al_code_pays<>0, annonces.code_pays = alertes.al_code_pays, 1 ) AND
IF (alertes.al_code_region<>0, annonces.code_region = alertes.al_code_region, 1) AND
IF (alertes.al_bat<>0, annonces.bat = alertes.al_bat, 1) AND
IF (alertes.al_q<>'', MATCH (annonces.titre, annonces.text, annonces.lieu) AGAINST ('my keyword' IN BOOLEAN MODE), 1) AND
annonces.status=0 AND
annonces.online=1
GROUP BY alertes.al_id
BUT I have a serious problem when I try to use matching with FullText. This request refuses to work, why????
I get :
"Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html........"
SELECT alertes.*, annonces.ann_id, count(annonces.ann_id) AS nba FROM alertes, annonces
WHERE
annonces.rub = alertes.al_rub AND
IF (alertes.al_code_pays<>0, annonces.code_pays = alertes.al_code_pays, 1 ) AND
IF (alertes.al_code_region<>0, annonces.code_region = alertes.al_code_region, 1) AND
IF (alertes.al_bat<>0, annonces.bat = alertes.al_bat, 1) AND
IF (alertes.al_q<>'', MATCH (annonces.titre, annonces.text, annonces.lieu) AGAINST (alertes.al_q IN BOOLEAN MODE), 1) AND
annonces.status=0 AND
annonces.online=1
GROUP BY alertes.al_id
Please help. I am stuck on this. I am sure it is just a little thing.
Best regards,
Giacomo
Edited 2 time(s). Last edit at 03/06/2006 08:20AM by Giacomo Biondi Morra.