CodeIgniter Forums
How to support $result->fetch_array(MYSQLI_ASSOC) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: How to support $result->fetch_array(MYSQLI_ASSOC) (/thread-6603.html)



How to support $result->fetch_array(MYSQLI_ASSOC) - El Forum - 03-05-2008

[eluser]jonnyjon[/eluser]
Is there a way to extend CI to support the MySQLI method:
$result->fetch_array(MYSQLI_ASSOC);

I'm a big fan of associative arrays and dislike the fact that I have to use alternate syntax for CI.

I would like to extend the DB class to support this if possible.


How to support $result->fetch_array(MYSQLI_ASSOC) - El Forum - 03-05-2008

[eluser]xwero[/eluser]
if you use result_array or row array you get an associative array if i'm not mistaken? The only thing that is numeric is are the row numbers with result_array.


How to support $result->fetch_array(MYSQLI_ASSOC) - El Forum - 03-05-2008

[eluser]jonnyjon[/eluser]
$result->result_array(); seems to be OK.

Is there any code that allows CI to match MySQLI syntax?