Welcome Guest, Not a member yet? Register   Sign In
Getting MySQL data as stdClass Object
#1

[eluser]Unknown[/eluser]
Hello Everyone,

Since a few weeks i'm using CodeIgniter.. i was like woah! this is great. And it is, my coding times have definately decreased. But now i'm struggling with this:

if i get some information from my Database with the lines:
Code:
<?php

$query = $this->db->get('table');

I will get this in return:
Code:
<?php

Print_r($query);

Array
(
[0] => stdClass Object
(
[id] => 1
[login] => OnceUponATim
[password] => 123
)

)

This will not work with the HTML Table class. Is there a way to do it differently to get it as an array instead of a stdClass Object?

(Sorry for my noobish question) Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB