Re: count with match probelm
| From: | Jochem Maas | Date: | Thu, 24 Mar 2005 15:29:19 +0000 |
| Subject: | Re: count with match probelm | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-211472@lists.php.net to get a copy of this message | ||
Richard Lynch wrote:
...
also he just wants the count with this statement so: 'MATCH(ad_sub,ad_text) AGAINST('$words') AS score' shouldn't be part of this query, instead: "SELECT COUNT(*) FROM ".$tcname."ads where is_confirmed=1 WHERE MATCH(ad_sub,ad_text) AGAINST('$words')"$how_many = mysql_result(mysql_query("SELECT COUNT(*), MATCH(ad_sub, ad_text) AGAINST('$words') AS score from ".$tcname."ads WHERE MATCH(ad_sub, ad_text) AGAINST('$words') FROM ".$tcname."ads where is_confirmed=1"),0);Hmmmm. Actually, I *can* tell you that you shouldn't have FROM in there twice. You've messed up your query something awful with that.