Re: Challenge FULLTEXT : email alerts 99% done HELP!
Hi,
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