Ejemplo n.º 1
0
 /**
  * CountriesChinaModel::delCountriesChina()
  * 中国地区删除
  * @param integer $id 中国地区ID
  * @return bool
  */
 public static function delCountriesChina($id)
 {
     self::initDB();
     $sql = "UPDATE `" . self::$prefix . self::$table . "` SET is_delete = 1 WHERE id = {$id}";
     $query = self::$dbConn->query($sql);
     if ($query) {
         $rows = self::$dbConn->affected_rows();
         if ($rows) {
             return $res;
         } else {
             self::$errCode = 10001;
             self::$errMsg = "删除数据失败";
             return false;
         }
     } else {
         self::$errCode = 10000;
         self::$errMsg = "执行SQL语句失败!";
         return false;
     }
 }