Exemplo n.º 1
0
 public function bindChecknStore(&$data, $preload = false)
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('products_en_gb.tsmart_product_id')->from('#__tsmart_products AS products')->leftJoin('#__tsmart_products_en_gb AS products_en_gb USING(tsmart_product_id)')->where('products_en_gb.tsmart_product_id!=' . (int) $data['tsmart_product_id'])->where('products_en_gb.product_name = ' . $query->q("{$data['product_name']}"));
     $db->setQuery($query);
     $list_tour = $db->loadObjectList();
     if (count($list_tour) > 0) {
         vmError('tour name exists, please select other tour name');
         return false;
     }
     return parent::bindChecknStore($data, $preload);
     // TODO: Change the autogenerated stub
 }