function countNonCashBenefits($schStr, $mode) { $tableName = 'HS_PR_SALARY_GRADE'; $arrFieldList[0] = 'SAL_GRD_CODE'; $arrFieldList[1] = 'SAL_GRD_NAME'; $sql_builder = new SQLQBuilder(); $sql_builder->table_name = $tableName; $sql_builder->table2_name = 'HS_HR_NONCASH_BEN_SALGRADE'; $sql_builder->flg_select = 'true'; $sql_builder->field = 'SAL_GRD_CODE'; $sql_builder->arr_select = $arrFieldList; $sqlQString = $sql_builder->countMultipleTab($schStr, $mode); //echo $sqlQString; $dbConnection = new DMLFunctions(); $message2 = $dbConnection->executeQuery($sqlQString); //Calling the addData() function $line = mysql_fetch_array($message2, MYSQL_NUM); return $line[0]; }