function getLastRecord($str)
 {
     $sql_builder = new SQLQBuilder();
     $tableName = 'HS_HR_EMP_CONTRACT_EXTEND';
     $arrFieldList[0] = 'ECON_EXTEND_ID';
     $arrFieldList[1] = 'EMP_NUMBER';
     $sql_builder->table_name = $tableName;
     $sql_builder->flg_select = 'true';
     $sql_builder->arr_select = $arrFieldList;
     $arrSel[0] = $str;
     $sqlQString = $sql_builder->selectOneRecordOnly(1, $arrSel);
     $dbConnection = new DMLFunctions();
     $message2 = $dbConnection->executeQuery($sqlQString);
     //Calling the addData() function
     $common_func = new CommonFunctions();
     if (isset($message2)) {
         $i = 0;
         while ($line = mysql_fetch_array($message2, MYSQL_ASSOC)) {
             foreach ($line as $col_value) {
                 $this->singleField = $col_value;
             }
         }
         $lastrec = (int) $this->singleField + 1;
         return $lastrec;
     }
 }