Destramic Posted January 30, 2011 Share Posted January 30, 2011 im getting an error: Warning: mysql_fetch_array() [function.mysql-fetch-array]: The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH. in C:\www\library\mysql.class.php on line 353 $result_type = "MYSQL_ASSOC"; $row = mysql_fetch_array($result, $result_type) but if i use (below) it works fine...is the constant() function the right way to what im doing? $result_type = "MYSQL_ASSOC"; $row = mysql_fetch_array($result, constant($result_type)) thank you Link to comment https://forums.phpfreaks.com/topic/226158-mysql-result-type-assocnum-both/ Share on other sites More sharing options...
jcbones Posted January 30, 2011 Share Posted January 30, 2011 Just plain `ole $row = mysql_fetch_array($result, MYSQL_ASSOC); Works also. Link to comment https://forums.phpfreaks.com/topic/226158-mysql-result-type-assocnum-both/#findComment-1167486 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.