|
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.
Navigation:
[Reply to this message]
|