How to execute my SQL Raw query in CodeIgniter
Raw SQL query from Codeigniter
Ex:
$query = "select column_names from table_name where foundations";
$result_data = $this->db->query($query);
$values = $result_data->result_object();
Explanation :
It is used to get a selected column from the table
This can be simply using Codeigniter ajax to call single-row data fetching.
$result_data->result_object()
This function returns the query results in an array formate
Ex : images codes
Tagged: