mysql_fetch_assoc returning int
Posted: Thu Mar 25, 2010 11:44 am
Hi
I've encountered an interesting problem in my PHP/MySQL application - the mysql_fetch_assoc function is returning an int value of 1 when running a query against one specific table - AFAIK, it should only return an associated array, or FALSE...
returns '1'. EXACTLY the same query against my other table returns a correct array.
Any ideas?!
Cheers,
Ben
I've encountered an interesting problem in my PHP/MySQL application - the mysql_fetch_assoc function is returning an int value of 1 when running a query against one specific table - AFAIK, it should only return an associated array, or FALSE...
Code: Select all
$sql = "SELECT * FROM `changes` WHERE `id` =" . $changeId;
$result = mysql_query($sql);
$change = @mysql_fetch_assoc($result);
mysql_free_result($result);
Any ideas?!
Cheers,
Ben