Reputation: 817
I am using Codeigniter 3.1.3, and want to display data from database, but following output display message occurs:
CI_DB_pdo_result Object
(
[conn_id] => PDO Object
(
)
[result_id] => PDOStatement Object
(
[queryString] => SELECT *
FROM `Tbl_Post`
)
[result_array] => Array
(
)
[result_object] => Array
(
)
[custom_result_object] => Array
(
)
[current_row] => 0
[num_rows] =>
[row_data] =>
)
--my connection is true. --my query i true. --controller is true. --model is true
how to fix this problem?
Upvotes: 1
Views: 39
Reputation: 1646
Use codeigniter Active Record Class for your query
$q = $this->db->get('Tbl_Post');
$result = $q->result();
//to view display query result
echo "<pre>"; print_r($result);
Upvotes: 1