I have a baffling problem trying to query a MySQL database using mysqli. I can only use the fetch_row method - the fetch_assoc doesn't work.

I don't think it's relevant but the code fragments below are called from a singleton DBManager class within a try{} block.

So this works fine.....
$result = $this->_dbConnection->query('SELECT name, shortname FROM real_club');
while ($row = $result->fetch_row())
printf ('%s %s<br>', $row[0], $row[1]);


But calling any of the other fetch functions (e.g. fetch_assoc) doesn't work, whether calling them procedurally or using the class interface. (NB $result->fetch_array(MYSQLI_NUM) is OK too.

So if I replace the fetch in the above code with the following
while ($row2 = $result->fetch_assoc())
echo "hello world<br>";

Then I end up with a Page Load Error - "Network Timeout - The operation timed out when attempting to contact www.localhost.com"


I can get by with the fetch_row, but would prefer to use fetch_assoc.
$finfo = $result->fetch_fields() works completely as expected, so I think the DB is working as I'd expect it to. Fields returned by it are as follows:
Table: real_club
Name: name
Flags: 4097
Type: 253

Table: real_club
Name: shortname
Flags: 4097
Type: 253

I am using php 5.2.8, MySql 5.1.31.

Any ideas would be appreciated. It seems like a very strange way for the call to fail.