public function insert($userid, $createddate, $expiredate, $resetdate, $isdelete) { //echo global_common::EXPIRE_RESET_DAYS; //echo global_common::addDays(global_common::nowSQL(),global_common::EXPIRE_RESET_DAYS); $guid = uniqid(); $strTableName = self::TBL_SL_RESET_PASSWORD; $strSQL = global_common::prepareQuery(self::SQL_INSERT_SL_RESET_PASSWORD, array(self::TBL_SL_RESET_PASSWORD, $guid, global_common::escape_mysql_string($userid), global_common::nowSQL(), global_common::addDays(global_common::nowSQL(), global_common::RESET_EXPIRE_DAYS), null, 0)); if (!global_common::ExecutequeryWithCheckExistedTable($strSQL, self::SQL_CREATE_TABLE_SL_RESET_PASSWORD, $this->_objConnection, $strTableName)) { //echo $strSQL; global_common::writeLog('Error add sl_reset_password:' . $strSQL, 1); return false; } return $guid; }