[eluser]bsrbvr[/eluser]
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 '' at line 3
SELECT `offer_title`, `off_url` FROM (`adp_offer`) WHERE `merchant_id` =
Hi
I am getting above error when executing following code.
public function get_merchantoffers($slug = FALSE)
{
$this->db->select('merchant_id');
$query = $this->db->get_where('adp_merchant', array('merchant_name' => $slug ));
$this->db->select('offer_title,off_url');
$result = $this->db->get_where('adp_offer', array('merchant_id' => $query));
return $result->row_array();
}
I want to pass the value available in query variable to get_where function.