Reply to Re: [PHP] count with match probelm

Your name:

Reply:


Posted by Jochem Maas on 03/24/05 17:29

Richard Lynch wrote:

....

>>$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.
>

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')"

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация