Hi ı have a problem with PDO
My db config :
Code:
$db['default'] = array(
'dsn' => 'mysql:host=localhost;dbname=ebaskan1_codeigniter',
'hostname' => 'localhost',
'username' => 'ebaskan1_codeigniter',
'password' => 'xxx',
'database' => 'ebaskan1_codeigniter',
'dbdriver' => 'pdo',
'dbprefix' => 'ren_',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
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) {
["conn_id"]=>
object(PDO)#14 (0) {
}
["result_id"]=>
object(PDOStatement)#19 (1) {
["queryString"]=>
string(23) "SELECT * FROM ren_users"
}
["result_array"]=>
array(0) {
}
["result_object"]=>
array(0) {
}
["custom_result_object"]=>
array(0) {
}
["current_row"]=>
int(0)
["num_rows"]=>
NULL
["row_data"]=>
NULL
}
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?