| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Sandy | Date: | March 28 2006 7:45pm |
| Subject: | Li'l problem with count() | ||
| View as plain text | |||
Hi
<p>Flies in pot = <?=flies();?> </p>
function flies(){
$sql = 'select count(*) from flies';
$lnk = mysql_connect('localhost','root','123456');
$db = mysql_select_db('moar',$lnk);
$result = mysql_query($sql,$lnk);
mysql_free_result($result);
mysql_close($lnk);
return $result;
}
Why this leads to 'ressource id #10' instead of the flies count ?
The query gives the actual count if I use it in a line command !!
thanks
| Thread | ||
|---|---|---|
| • Li'l problem with count() | Sandy | 28 Mar |
| • Re: Li'l problem with count() | Peter Brawley | 28 Mar |
| • RE: Li'l problem with count() | Jay Blanchard | 28 Mar |
| • Re: Li'l problem with count() | Sandy | 28 Mar |
| • Re: Li'l problem with count() | Sandy | 28 Mar |
| • RE: Re: Li'l problem with count() | Jay Blanchard | 29 Mar |
