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
mysql-no-subselect-and-isset.patch.gz
Description: Binary data
signature.asc
Description: Digital signature
|