Welcome Guest, Not a member yet? Register   Sign In
Always Null SQL Result
#1

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?
Reply


Messages In This Thread
Always Null SQL Result - by Refik - 05-14-2018, 06:00 AM
RE: Always Null SQL Result - by dave friend - 05-14-2018, 12:50 PM
RE: Always Null SQL Result - by InsiteFX - 05-14-2018, 01:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB