Commit 02ddcbed by Tobin

t : category api issue : uat

parent 68663f03
......@@ -713,13 +713,13 @@ class Webservice_model extends CI_Model {
$where = '';
$countryData = $this->getCountryData($user_id);
$lang = $countryData['language_code'];
if(isset($data['query'])) {
if(isset($data['query']) && !empty($data['query'])) {
$where = ' AND TC.category_name LIKE '."'%".$data['query'].'%'."'";
}
$sql = "SELECT TC.category_id,TC.category_name,TC.category_image
FROM translator_category AS TC
INNER JOIN event_category AS ECAT ON (ECAT.cat_id=TC.category_id)
WHERE ECAT.status = 1 AND TC.language_code='$lang' $where
WHERE ECAT.status = 1 AND (TC.language_code='$lang' OR TC.language_code='EN') $where
GROUP BY ECAT.cat_id ORDER BY ECAT.priority";
$result = $this->db->query($sql)->result();
if(count($result) > 0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment