$query = sprintf("select machines from `domains`.`%s`", $this->escape($domain));
$result = $this->query($query);
if(empty($result) || ! $result){
returnfalse;
}else{
return$result;
}
}
}
$result = getMachines($domain);
echomysql_num_rows($result);
$row = mysql_fetch_array($result, MYSQL_NUM);
Notes: $this->escape is a shortcut function to mysql_real_escape_string, $this->connection is a private variable holding the sql connection, $this->query is a shortcut to mysql_query.
The problem is that the mysql_num_rows echos out 27, which is correct, but when I do a print_r on $row it only displays only the first item that should be in the select result, and count($row) outputs 1.
Anyone have any ideas? I am using the same basic code other places with no problems.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.