codeigniter版本中的SQL查询冲突

I have the Following SQL Query whic runs perfectly in codeigniter version 3 It Shows error in version 2.

$this->db->select('*');
     if($cond!=''){
     $this->db->where($cond);
     }
     $this->db->from('(select * from products1 where pr_id  in('.implode(",",$condin).') order by pr_id asc) as a ');
     $this->db->join(PRICE_TABLE.' as b','a.pr_id=b.pr_id','inner');
     $this->db->limit($limit);
     $query=$this->db->get();
     return $query;

The error is

 A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by pr_id asc) as a) INNER JOIN `pr_product_attr_usa_new` as b ON `a`.`pr_i' at line 2

SELECT * FROM ((select * from products1 where pr_id in(752, `6263`, `542`, `2059)` order by pr_id asc) as a) INNER JOIN `pr_product_attr_usa_new` as b ON `a`.`pr_id`=`b`.`pr_id` WHERE `b`.`pr_stock` = 'yes' LIMIT 6

Filename: D:\XAMPP\htdocs\pr_sites\us\chk\system\database\DB_driver.php

Line Number: 331 

The issue is related to the code:
in('.implode(",",$condin).')

which output:

 (752, `6263`, `542`, `2059)`

instead of:

 (752, `6263`, `542`, `2059`)

The ` symbol is outside the ')'.