Reply to Re: Big problems with mysql_num_rows - PLEASE HELP!

Your name:

Reply:


Posted by Colin McKinnon on 02/26/07 22:32

google@framevillage.com wrote:

>
> SQL STATEMENT:
> ==============
> SELECT * FROM campaign_contact cc
> LEFT JOIN optins_master co
> ON cc.cc_cont_id=co.optin_id
> WHERE cc.cc_camp_id=3270
> AND (co.status_flag IS NULL OR co.status_flag!='unsub');
>
> When I run the query, I get one of two results.
>
> 1. mysql_num_rows() returns the number of rows it found and all of the
> data associated with it.
>
> 2. mysql_num_rows() returns 0 rows, but still gives me all of the
> data. In the example above (cc.cc_camp_id=3270) it gives me 2,579
> rows.

Taking a wild stab in the dark, the num_rows is only known if the query
result is cached / and/or you iterate to the end of the data set on this or
the previous access.

Try asking on a MySQL list for more educated guesses.

C.

[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

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