Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

Patch for Emilda when using MySQL 4.0.18: msg#00059

Subject: Patch for Emilda when using MySQL 4.0.18
I have been using Emilda with full debugging (level 5), and have noticed
some issues with the non-sub-select work-around.  Essentially, when no
rows are in the artificial sub-select, a debug message indicates that a
non-valid mysql resource was used in mysql_num_rows().

I've read at http://us4.php.net/mysql_query that "Only for
SELECT,SHOW,EXPLAIN or DESCRIBE statements mysql_query() returns a
resource identifier or FALSE if the query was not executed correctly."

Thus, it is sometimes expected that these artificial sub-selects will
return FALSE, indicating that no rows are found.  Adding the extra check
for '$res != FALSE' appears to eliminate the message, while seeming to
function properly in my environment.

In this patch is also one instance where the artificial sub-select should
have been used but was not, and also a few "isset" additions that were
noticed.
-- 
Encrypted Mail Preferred:
    Key ID:  8527B9AF
    Key Fingerprint:  E1B6 40B6 B73F 695E 0D3B  644E 6427 DD74 8527 B9AF
    Information:  http://www.gnupg.org/
                                                                                
ASCII ribbon campaign:
()  against HTML email
/\  against Microsoft attachments
    Information:  http://www.expita.com/nomime.html

Attachment: mysql-no-subselect-and-isset.patch.gz
Description: Binary data

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>