Originariamente inviato da blur
Codice PHP:
$query_img ="SELECT * FROM tbl_images WHERE pd_id = {$row['pd_id']}"
$result_img dbQuery($query_img) or die(mysql_error()); 
$num_righe mysql_num_rows($result_img); 
echo 
"$num_righe Righe\n"

while(
$img dbFetchAssoc($result_img)) { 
extract($img); 
if (
$num_righe == 0) { 
echo
" no img"
} else { 
echo
" si img"


Perchè se $num_righe == 0 non mi stampa niente? Cioè "no img" ?
Forse perchè se il resultset è vuoto non entra nel while ?!