Answers for "codeigniter query"

PHP
1

codeigniter raw query

$sql="Select * from my_table where 1";    
    $query = $this->db->query($SQL);
    return $query->result_array();
Posted by: Guest on September-03-2020
3

get result count codeigniter

public function record_count() {
   return $this->db->count_all("tablename");
}
Posted by: Guest on November-02-2020
0

get results from db and put in javascript array codeigniter

$query = $this->db->query("YOUR QUERY");

foreach ($query->result_array() as $row)
{
        echo $row['title'];
        echo $row['name'];
        echo $row['body'];
}
Posted by: Guest on July-05-2020

Browse Popular Code Answers by Language