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 Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.