I am trying to get the value of rows depending on the sql select statement and the criteria.
Here is the code im using:
$fund = "SELECT COUNT(fundtid) from fund where fundtid='1'";
$result = mysql_query($fund, $connection);
if(!$result) {
die(mysql_error());
}
$row = mysql_fetch_row($result);
print_r($row);
and it prints me this “Array ( [0] => 0 )”
From the php mysql_fetch_row manual:
If you use
$row[0]you have your result, e.g.:print_r($row[0]);