[eluser]Shaileen[/eluser]
"SELECT count(*) from dsl_tt WHERE order_id = '$quote_id' AND resolved = 0";
can anybody help me to write the CI code for the above perl statement..
I tried this one..
function get_tt_exist($order_id)
{
$this->db->count_all('dsl_tt');
$this->db->where('order_id ', $order_id);
$this->db->where('resolved', 0);
$query = $this->db->get();
$row = $query->row();
return $row->order_id;
}
I am getting the following error :
ERROR: SELECT * with no tables specified is not valid
SELECT * WHERE "order_id" = 'tq390360400062' AND "resolved" = 0
Can you please help me with this..