2010年12月28日星期二

Re: [fw-db] Db Select prints wrong info

On Dec 28, 2010, at 5:27 AM, Erdal YAZICIOGLU wrote:
> It prints 1 instead of 0s for the pending articles.

Suggestions:

If you have more than one copy of Application_Model_DbTable_Articles
in your include path, make sure you're running the one you think you
are. Add a diagnostic print statement inside your pendingArticles()
method, to output __FILE__.

Use the Zend_Db_Profiler to examine the exact SQL you're executing.
Alternatively, look in the database query log to see the statement it
executed. It's easier to debug SQL by looking at SQL, not code that
constructs SQL.

Try the same SQL in your database query tool (e.g. MySQL Workbench or
the mysql CLI). What data does the query return?

Regards,
Bill Karwin

没有评论: