Always Null SQL Result |
Hi ı have a problem with PDO
My db config : Code: $db['default'] = array( My SQL Code: Code: $this->db->get('users'); or $this->db->query("SELECT * FROM ren_users"); var_dump results: Code: object(CI_DB_pdo_result)#20 (8) { Yes my sql connections is true and yes again ı'am search this in google but ı cant fix. How can ı take the data from database. How can ı fix this?
After calling get() or query() you need to use the returned object to Generate Query Results.
Something along these lines PHP Code: $query = $this->db->get('users'); The dump should show an array where each "row" from the table is a stdClass object. The link to the documentation provided above details what to expect and shows the other "results" methods available.
Try this:
Prepends a database prefix, if one exists in configuration. PHP Code: $this->db->dbprefix($table_name); What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |