Meine Abfrage lautet also:
Code: Select all
$this->db->from('tbl_coupons');
if($storeids !=''){
$ids = array($storeids);
$this->db->where_in('coupon_store', $ids );
}
$this->db->where('coupon_cat', $catid);
$this->db->where('coupon_status', 'active');
$query = $this->db->get();
if ($query->num_rows() > 0) {
$ds = $query->result_array();}
SELECT * FROM `tbl_coupons`
WHERE `coupon_store` IN('1,97')
AND `coupon_cat` = '16'
AND `coupon_status` = 'active'
Aber diese Abfrage gibt Werte mit „coupon_store=1“ zurück und es kommen keine Ergebnisse für „coupon_store=97“
Ich habe die Werte für den Coupon-Shop 97 überprüft, der in dieser Kategorie existiert.
Mobile version