public function update($articleid, $prefix, $title, $filename, $articletype, $content, $notificationtype, $tags, $numview, $numcomment, $createdby, $createddate, $modifiedby, $modifieddate, $deletedby, $deleteddate, $isdeleted, $status, $comments, $reneweddate, $renewednum, $companyname, $companyAddress, $companyWebsite, $companyPhone, $adType, $startDate, $endDate, $happyDays, $startHappyHour, $endHappyHour, $addresses, $dictricts, $cities)
 {
     $strTableName = self::TBL_SL_ARTICLE;
     $strSQL = global_common::prepareQuery(self::SQL_UPDATE_SL_ARTICLE, array($strTableName, global_common::escape_mysql_string($articleid), global_common::escape_mysql_string($prefix), global_common::escape_mysql_string($title), global_common::escape_mysql_string($filename), global_common::escape_mysql_string($content), global_common::escape_mysql_string($notificationtype), global_common::escape_mysql_string($tags), global_common::escape_mysql_string($numview), global_common::escape_mysql_string($numcomment), global_common::escape_mysql_string($createdby), global_common::escape_mysql_string($createddate), global_common::escape_mysql_string($modifiedby), global_common::escape_mysql_string($modifieddate), global_common::escape_mysql_string($deletedby), global_common::escape_mysql_string($deleteddate), global_common::escape_mysql_string($isdeleted), global_common::escape_mysql_string($status), global_common::escape_mysql_string($comments), global_common::escape_mysql_string($reneweddate), global_common::escape_mysql_string($renewednum), global_common::escape_mysql_string($companyname), global_common::escape_mysql_string($companyAddress), global_common::escape_mysql_string($companyWebsite), global_common::escape_mysql_string($companyPhone), global_common::escape_mysql_string($adType), '\'' . global_common::formatDateTimeSQL($startDate) . '\'', global_common::formatDateTimeSQL($endDate) ? '\'' . global_common::formatDateTimeSQL($endDate) . '\'' : 'null', global_common::escape_mysql_string($happyDays), $startHappyHour ? '\'' . $startHappyHour . '\'' : 'null', $endHappyHour ? '\'' . $endHappyHour . '\'' : 'null', global_common::escape_mysql_string($addresses), global_common::escape_mysql_string($dictricts), global_common::escape_mysql_string($cities)));
     if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_ARTICLE, $this->_objConnection, $strTableName)) {
         //echo $strSQL;
         global_common::writeLog('Error add sl_article:' . $strSQL, 1);
         return false;
     }
     $strSQL = global_common::prepareQuery(global_common::SQL_DELETE_BY_CONDITION, array(self::TBL_SL_ARTICLE_TYPE_ID, global_mapping::ArticleID, $articleid));
     if (global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_ARTICLE_TYPE_ID, $this->_objConnection, self::TBL_SL_ARTICLE_TYPE_ID)) {
         $strSQLValueType = '';
         foreach ($articletype as $item) {
             $strSQLValueType .= '(\'' . $item . '\', \'' . $articleid . '\'),';
         }
         $strSQLValueType = global_common::cutLast($strSQLValueType);
         $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_ARTICLE_TYPE_ID, array(self::TBL_SL_ARTICLE_TYPE_ID, $strSQLValueType));
         if (!global_common::ExecuteMultiqueryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_ARTICLE_TYPE_ID, $this->_objConnection, self::TBL_SL_ARTICLE_TYPE_ID)) {
         }
         global_common::writeLog('Error add sl_article_type_id:' . $strSQL, 1);
     }
     return $articleid;
 }