Hi,
maybe you could help me. First function is working perfectly, but second one doesn’t and it shows Warning: on line 50 $num_rows = mysql_numrows($result);
I don’t know what to do because both functions are very similar. What i do wrong? Maybe it’s because i putting variable to function from mysql_result()?
Terminas | Reikšmė | |
$uterm | $ureiksm | $linkcom |
\n"; } ?> <? function displayComments($id){ global $database; $q = "SELECT comment " ."FROM ".TBL_COMMENT."WHERE terid='$id'"; $result = $database->query($q); /* Error occurred, return given name by default */ $num_rows = mysql_numrows($result); if(!$result || ($num_rows < 0)){ echo "Error displaying info"; return; } if($num_rows == 0){ echo "Lentelė tuščia."; return; } /* Display table contents */ echo "
Termino komentarai |
$ucomm |
\n"; } ?>