本文整理汇总了PHP中DMLFunctions类的典型用法代码示例。如果您正苦于以下问题:PHP DMLFunctions类的具体用法?PHP DMLFunctions怎么用?PHP DMLFunctions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DMLFunctions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _selectValue
/**
* Outputs the 'value' corresponding to 'key'
* @param string $key 'key' field where corresponding 'value' is needed
*/
private static function _selectValue($key)
{
$selectTable = "`" . self::DB_TABLE_CONFIG . "`";
$selectFields[0] = "`" . self::DB_FIELD_VALUE . "`";
$selectConditions[0] = "`" . self::DB_FIELD_KEY . "` = '" . $key . "'";
$sqlBuilder = new SQLQBuilder();
$query = $sqlBuilder->simpleSelect($selectTable, $selectFields, $selectConditions);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
if ($dbConnection->dbObject->numberOfRows($result) != 1) {
throw new Exception("Value corresponding to {$key} could not be selected");
}
$resultArray = $dbConnection->dbObject->getArray($result);
return $resultArray[0];
}
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:19,代码来源:Config.php
示例2: getCSVData
/**
* Get CSV data as string
*
* @return string formatted csv data
*/
public function getCSVData()
{
$sql = "SELECT hs_hr_employee.emp_number, employee_id, emp_lastname, emp_firstname, emp_middle_name, emp_street1, emp_street2," . "city_code,provin_code,emp_zipcode,emp_gender,emp_birthday,emp_ssn_num,emp_status,joined_date, " . "tax_federal_status, tax_federal_exceptions, tax_state, tax_state_status, tax_state_exceptions, " . "tax_unemp_state,tax_work_state,custom1,custom2,custom3,custom4,custom5,custom6,custom7,custom8,custom9,custom10, " . " pay.payperiod_code,sal.ebsal_basic_salary,loc.loc_name,comp.title " . " FROM hs_hr_employee " . " LEFT JOIN hs_hr_emp_us_tax tax on (tax.emp_number = hs_hr_employee.emp_number) " . " LEFT JOIN hs_hr_emp_basicsalary sal on (hs_hr_employee.emp_number = sal.emp_number) " . " LEFT JOIN hs_hr_payperiod pay on (sal.payperiod_code = pay.payperiod_code) " . " LEFT JOIN hs_hr_compstructtree comp on (hs_hr_employee.work_station = comp.id) " . " LEFT JOIN hs_hr_location loc on (comp.loc_code = loc.loc_code) ";
if (KeyHandler::keyExists()) {
$key = KeyHandler::readKey();
$sql = str_replace("emp_ssn_num", "IF(`emp_ssn_num` IS NOT NULL, AES_DECRYPT(emp_ssn_num, '{$key}'), '') AS `emp_ssn_num`", $sql);
$sql = str_replace("sal.ebsal_basic_salary", "IF(`ebsal_basic_salary` IS NOT NULL, AES_DECRYPT(ebsal_basic_salary, '{$key}'), '') AS `ebsal_basic_salary`", $sql);
}
$conn = new DMLFunctions();
$result = $conn->executeQuery($sql);
$csv = "";
if ($result === false) {
throw new Exception("Error in query: " . $sql);
}
while ($row = mysql_fetch_assoc($result)) {
$csv .= $this->_getCSVRow($row) . "\n";
}
return $csv;
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:24,代码来源:MilleniumPayrollExport.php
示例3: filterUser
function filterUser($userName)
{
$sql_builder = new SQLQBuilder();
$dbConnection = new DMLFunctions();
$this->username = mysql_real_escape_string($userName);
$tableName = 'HS_HR_USERS a LEFT JOIN HS_HR_EMPLOYEE b ON (a.EMP_NUMBER = b.EMP_NUMBER)';
$arrFieldList[0] = 'a.USER_NAME';
$arrFieldList[1] = 'a.USER_PASSWORD';
$arrFieldList[2] = 'IFNULL(b.EMP_FIRSTNAME, a.USER_NAME)';
$arrFieldList[3] = 'a.ID';
$arrFieldList[4] = 'a.USERG_ID';
$arrFieldList[5] = 'a.STATUS';
$arrFieldList[6] = 'LPAD(a.`EMP_NUMBER`, ' . $this->employeeIdLength . ', 0)';
$arrFieldList[7] = 'a.IS_ADMIN';
$arrFieldList[8] = 'b.EMP_STATUS';
$arrFieldList[9] = 'a.EMP_NUMBER';
$sql_builder->table_name = $tableName;
$sql_builder->flg_select = 'true';
$sql_builder->arr_select = $arrFieldList;
$sqlQString = $sql_builder->selectOneRecordFiltered($this->username);
//echo $sqlQString;
$message2 = $dbConnection->executeQuery($sqlQString);
//Calling the addData() function
if ($message2 && mysql_num_rows($message2) != 0) {
$i = 0;
while ($line = mysql_fetch_array($message2, MYSQL_NUM)) {
$arrayDispList[$i][0] = $line[0];
$arrayDispList[$i][1] = $line[1];
$arrayDispList[$i][2] = $line[2];
$arrayDispList[$i][3] = $line[3];
$arrayDispList[$i][4] = $line[4];
$arrayDispList[$i][5] = $line[5];
$arrayDispList[$i][6] = $line[6];
$arrayDispList[$i][7] = $line[7];
$arrayDispList[$i][8] = $line[8];
$arrayDispList[$i][9] = $line[9];
$i++;
}
return $arrayDispList;
} else {
return NULL;
}
}
开发者ID:THM068,项目名称:orangehrm,代码行数:43,代码来源:Login.php
示例4: assignData
function assignData($index, $object)
{
switch ($index) {
case 'EMPVIEW':
$repgen = new ReportGenerator();
$repgen = $object;
$sqlQ = $repgen->reportQueryBuilder();
$dbConnection = new DMLFunctions();
$message2 = $dbConnection->executeQuery($sqlQ);
$i = 0;
while ($line = mysql_fetch_array($message2, MYSQL_NUM)) {
for ($c = 0; count($repgen->field) > $c; $c++) {
$arrayDispList[$i][$c] = $line[$c];
}
$i++;
}
$repgen->reportDisplay($arrayDispList);
break;
}
}
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:20,代码来源:RepViewController.php
示例5: fetchOptions
public static function fetchOptions($table, $valueField, $labelField, $descField, $filterKey, $joinTable = null, $joinCondition = null, $compareMethod = self::COMPARE_LEFT, $caseSensitive = false)
{
$selecteFields[] = $valueField;
$selecteFields[] = $labelField;
$selecteFields[] = $descField;
$selectTables[] = $table;
$selectTables[] = $joinTable;
$joinConditions[1] = $joinCondition;
if (!$caseSensitive) {
$labelField = "LOWER({$labelField})";
$filterKey = strtolower($filterKey);
}
switch ($compareMethod) {
case self::COMPARE_LEFT:
$selectConditions[] = "{$labelField} LIKE '{$filterKey}%'";
break;
case self::COMPARE_RIGHT:
$selectConditions[] = "{$labelField} LIKE '%{$filterKey}'";
break;
case self::COMPARE_MID:
$selectConditions[] = "{$labelField} LIKE '%{$filterKey}%'";
break;
}
$orderCondition = $labelField;
$sqlBuilder = new SQLQBuilder();
$query = $sqlBuilder->selectFromMultipleTable($selecteFields, $selectTables, $joinConditions, $selectConditions, null, $orderCondition);
$query = self::_formatQuery($query);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
if (mysql_error()) {
echo mysql_error() + "\n" + $query;
die;
}
$result = $dbConnection->executeQuery($query);
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$value = trim($row[0]);
$label = trim($row[1]);
$description = $row[2] == '' ? ' ' : trim($row[2]);
echo "{$value},{$label},{$description}\n";
}
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:41,代码来源:AjaxCalls.php
示例6: getPayPeriodList
/**
* Get list of pay periods defined in the system
* @return array Array of all pay periods defined in the system
*/
public static function getPayPeriodList()
{
$fields[0] = self::DB_FIELD_PAYPERIOD_NAME;
$fields[1] = self::DB_FIELD_PAYPERIOD_CODE;
$sql_builder = new SQLQBuilder();
$sql_builder->table_name = self::TABLE_NAME;
$sql_builder->flg_select = 'true';
$sql_builder->arr_select = $fields;
$sql = $sql_builder->queryAllInformation();
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($sql);
$periods = array();
if ($result && mysql_num_rows($result) > 0) {
while ($line = mysql_fetch_assoc($result)) {
$period = new PayPeriod();
$period->setCode($line[self::DB_FIELD_PAYPERIOD_CODE]);
$period->setName($line[self::DB_FIELD_PAYPERIOD_NAME]);
$periods[$period->getCode()] = $period;
}
}
return $periods;
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:26,代码来源:PayPeriod.php
示例7: getUnAssCurrCodes
function getUnAssCurrCodes($salGrd, $eno)
{
$sqlQString = "SELECT b.CURRENCY_NAME, a.* FROM HS_PR_SALARY_CURRENCY_DETAIL a, HS_HR_CURRENCY_TYPE b WHERE a.CURRENCY_ID NOT IN (SELECT CURRENCY_ID FROM hs_hr_emp_basicsalary WHERE SAL_GRD_CODE = '" . $salGrd . "' AND EMP_NUMBER = '" . $eno . "') AND a.CURRENCY_ID = b.CURRENCY_ID AND a.SAL_GRD_CODE = '" . $salGrd . "'";
$sqlQString = strtolower($sqlQString);
//echo $sqlQString;
$dbConnection = new DMLFunctions();
$message2 = $dbConnection->executeQuery($sqlQString);
//Calling the addData() function
$i = 0;
while ($line = mysql_fetch_array($message2, MYSQL_NUM)) {
$arrayDispList[$i][0] = $line[0];
$arrayDispList[$i][1] = $line[1];
$arrayDispList[$i][2] = $line[2];
$arrayDispList[$i][3] = $line[3];
$arrayDispList[$i][4] = $line[4];
$arrayDispList[$i][5] = $line[5];
$i++;
}
if (isset($arrayDispList)) {
return $arrayDispList;
} else {
$arrayDispList = '';
return $arrayDispList;
}
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:25,代码来源:EmpBasSalary.php
示例8: _isEmployeeTerminated
/**
* Used to check whether the employee's status is terminated
*/
private static function _isEmployeeTerminated($employeeId)
{
$selectTable = "`hs_hr_employee` a";
$selectFields[0] = "a.`emp_status`";
$selectConditions[0] = "a.`employee_id`= {$employeeId}";
$sqlBuilder = new SQLQBuilder();
$query = $sqlBuilder->simpleSelect($selectTable, $selectFields, $selectConditions);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
$employeeStatus = mysql_fetch_array($result, MYSQL_NUM);
return $employeeStatus[0] === EmploymentStatus::EMPLOYMENT_STATUS_ID_TERMINATED;
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:15,代码来源:Hsp.php
示例9: retrieveActivityProjectId
/**
* Retrieves Project Id of a given Activity Id.
* @param integer $activityId
* @return integer Returns Project Id on success, Null on failiure
*/
public function retrieveActivityProjectId($activityId)
{
$selectTable = "`" . self::TABLE_NAME . "`";
$selectFields[0] = "`" . self::DB_FIELD_PROJECT_ID . "`";
$selectConditions[0] = "`" . self::DB_FIELD_ACTIVITY_ID . "` = {$activityId}";
$sqlBuilder = new SQLQBuilder();
$query = $sqlBuilder->simpleSelect($selectTable, $selectFields, $selectConditions);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
$row = $dbConnection->dbObject->getArray($result);
if (isset($row[0])) {
return $row[0];
} else {
return null;
}
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:21,代码来源:ProjectActivity.php
示例10: _getEmployeeSearchList
private static function _getEmployeeSearchList()
{
$employeeSearchList = array();
$selecteFields[] = 'CONCAT(em.`emp_firstname`, \' \', em.`emp_lastname`)';
$selecteFields[] = 'jt.`jobtit_name`';
$selecteFields[] = 'em.`emp_number`';
$selectTables[] = '`hs_hr_employee` AS em';
$selectTables[] = '`hs_hr_job_title` AS jt';
$joinConditions[1] = 'jt.`jobtit_code` = em.`job_title_code`';
$orderCondition = $selecteFields[1];
$sqlBuilder = new SQLQBuilder();
$query = $sqlBuilder->selectFromMultipleTable($selecteFields, $selectTables, $joinConditions, null, null, $orderCondition);
$query = preg_replace("/\\\\'/", "'", $query);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
$result = $dbConnection->executeQuery($query);
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$row[0] = addslashes($row[0]);
$employeeSearchList[] = $row;
}
return $employeeSearchList;
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:22,代码来源:RecruitmentController.php
示例11: filterJobTitles
function filterJobTitles($getID)
{
$arrFieldList[0] = 'JOBTIT_CODE';
$arrFieldList[1] = 'JOBTIT_NAME';
$arrFieldList[2] = 'JOBTIT_DESC';
$arrFieldList[3] = 'JOBTIT_COMM';
$arrFieldList[4] = 'SAL_GRD_CODE';
$arrFieldList[5] = self::DB_FIELD_JOBSPEC_ID;
$tableName = 'HS_HR_JOB_TITLE';
$sql_builder = new SQLQBuilder();
$sql_builder->table_name = $tableName;
$sql_builder->flg_select = 'true';
$sql_builder->arr_select = $arrFieldList;
$sqlQString = $sql_builder->selectOneRecordFiltered($getID);
//echo $sqlQString;
$dbConnection = new DMLFunctions();
$message2 = $dbConnection->executeQuery($sqlQString);
//Calling the addData() function
$i = 0;
while ($line = mysql_fetch_array($message2, MYSQL_NUM)) {
$arrayDispList[$i][0] = $line[0];
$arrayDispList[$i][1] = $line[1];
$arrayDispList[$i][2] = $line[2];
$arrayDispList[$i][3] = $line[3];
$arrayDispList[$i][4] = $line[4];
$arrayDispList[$i][5] = $line[5];
$i++;
}
if (isset($arrayDispList)) {
return $arrayDispList;
} else {
$arrayDispList = '';
return $arrayDispList;
}
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:35,代码来源:JobTitle.php
示例12: getLastRecord
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;
}
}
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:26,代码来源:EmpConExt.php
示例13: _getProjects
/**
* Queries the hs_hr_project_admin and hs_hr_project tables with the given conditions
*
* @param int $empNumber The employee number to filter by
* @param int $projectId The project ID to filter by
* @param bool $includeDeleted Whether deleted projects should be included
*
* @return resource Resource returned from the database.
*/
private function _getProjects($empNumber, $projectId = null, $includeDeleted = false)
{
$fields[0] = "b.`" . Projects::PROJECT_DB_FIELD_PROJECT_ID . "`";
$fields[1] = "b.`" . Projects::PROJECT_DB_FIELD_CUSTOMER_ID . "`";
$fields[2] = "b.`" . Projects::PROJECT_DB_FIELD_NAME . "`";
$fields[3] = "b.`" . Projects::PROJECT_DB_FIELD_DESCRIPTION . "`";
$fields[4] = "b.`" . Projects::PROJECT_DB_FIELD_DELETED . "`";
$tables[0] = "`" . self::TABLE_NAME . "` a ";
$tables[1] = "`" . Projects::PROJECT_DB_TABLE . "` b ";
$selectConditions[] = "a.`" . self::PROJECT_ADMIN_FIELD_EMP_NUMBER . "`= {$empNumber} ";
if (!$includeDeleted) {
$selectConditions[] = "b.`" . Projects::PROJECT_DB_FIELD_DELETED . "`= " . Projects::PROJECT_NOT_DELETED;
}
if (!empty($projectId)) {
$selectConditions[] = "a.`" . self::PROJECT_ADMIN_FIELD_PROJECT_ID . "`= {$projectId} ";
}
$joinConditions[1] = "a.`" . self::PROJECT_ADMIN_FIELD_PROJECT_ID . "` = b.`" . Projects::PROJECT_DB_FIELD_PROJECT_ID . "`";
$sqlBuilder = new SQLQBuilder();
$sql = $sqlBuilder->selectFromMultipleTable($fields, $tables, $joinConditions, $selectConditions);
$conn = new DMLFunctions();
$results = $conn->executeQuery($sql);
return $results;
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:32,代码来源:ProjectAdminGateway.php
示例14: isWeekend
/**
* Check whether the given date is a weekend.
* @param date $date
* @return bool true on success and false on failiure
*/
public static function isWeekend($date)
{
$dayNumber = date('N', strtotime($date));
$selectTable = "`" . self::WEEKENDS_TABLE . "`";
$selectFields[0] = "`" . self::WEEKENDS_TABLE_LENGTH . "`";
$selectConditions[0] = "`" . self::WEEKENDS_TABLE_DAY . "` = {$dayNumber}";
$sqlBuilder = new SQLQBuilder();
$query = $sqlBuilder->simpleSelect($selectTable, $selectFields, $selectConditions);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
$row = $dbConnection->dbObject->getArray($result);
if ($row[0] == self::WEEKENDS_LENGTH_WEEKEND) {
return true;
} else {
return false;
}
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:22,代码来源:Weekends.php
示例15: getProvinceCodes
function getProvinceCodes($getID)
{
$this->getID = $getID;
$tableName = 'HS_HR_PROVINCE';
$arrFieldList[0] = 'COU_CODE';
$arrFieldList[1] = 'PROVINCE_CODE';
$arrFieldList[2] = 'PROVINCE_NAME';
$sql_builder = new SQLQBuilder();
$sql_builder->table_name = $tableName;
$sql_builder->flg_select = 'true';
$sql_builder->arr_select = $arrFieldList;
$sqlQString = $sql_builder->selectOneRecordFiltered($this->getID);
//echo $sqlQString;
$dbConnection = new DMLFunctions();
$message2 = $dbConnection->executeQuery($sqlQString);
//Calling the addData() function
$i = 0;
while ($line = mysql_fetch_array($message2, MYSQL_NUM)) {
for ($c = 0; count($arrFieldList) > $c; $c++) {
$arrayDispList[$i][$c] = $line[$c];
}
$i++;
}
if (isset($arrayDispList)) {
return $arrayDispList;
} else {
$arrayDispList = '';
return $arrayDispList;
}
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:30,代码来源:ProvinceInfo.php
示例16: getAssEmpSkill
function getAssEmpSkill($getID)
{
$this->getID = $getID;
$tableName = 'HS_HR_EMP_SKILL';
$arrFieldList[0] = 'EMP_NUMBER';
$arrFieldList[1] = 'SKILL_CODE';
$arrFieldList[2] = 'YEARS_OF_EXP';
$arrFieldList[3] = 'COMMENTS';
$sql_builder = new SQLQBuilder();
$sql_builder->table_name = $tableName;
$sql_builder->flg_select = 'true';
$sql_builder->arr_select = $arrFieldList;
$sqlQString = $sql_builder->selectOneRecordFiltered($this->getID);
//echo $sqlQString;
$dbConnection = new DMLFunctions();
$message2 = $dbConnection->executeQuery($sqlQString);
//Calling the addData() function
$i = 0;
while ($line = mysql_fetch_array($message2, MYSQL_NUM)) {
for ($c = 0; count($arrFieldList) > $c; $c++) {
$arrayDispList[$i][$c] = $line[$c];
}
$i++;
}
if (isset($arrayDispList)) {
return $arrayDispList;
} else {
$arrayDispList = '';
return $arrayDispList;
}
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:EmpSkill.php
示例17: getJobStatusFromTitle
public function getJobStatusFromTitle($getID)
{
$this->getID = $getID;
$dbConnection = new DMLFunctions();
if ($this->getID == '0') {
// if clicked on select
$selectTable = "`hs_hr_empstat` a";
$arrFieldList[0] = "a.`estat_code`";
$arrFieldList[1] = "a.`estat_code`";
$arrFieldList[2] = "a.`estat_name`";
$selectConditions = null;
} else {
$selectTable = "`hs_hr_jobtit_empstat` a,`hs_hr_empstat` b";
$arrFieldList[0] = "a.`jobtit_code`";
$arrFieldList[1] = "a.`estat_code`";
$arrFieldList[2] = "b.`estat_name`";
// ID should not have quotes, so it's safe to escape without looking at magic quotes setting
$selectConditions[] = "a.`jobtit_code`='" . mysql_real_escape_string($this->getID) . "'";
$selectConditions[] = "a.`estat_code`=b.`estat_code`";
}
$sql_builder = new SQLQBuilder();
$sqlQString = $sql_builder->simpleSelect($selectTable, $arrFieldList, $selectConditions, $arrFieldList[2], 'ASC');
$result = $dbConnection->executeQuery($sqlQString);
$i = 0;
$fieldNum = count($arrFieldList);
while ($line = $dbConnection->dbObject->getArray($result)) {
for ($c = 0; $fieldNum > $c; $c++) {
$arrayDispList[$i][$c] = $line[$c];
}
$i++;
}
if (isset($arrayDispList)) {
return $arrayDispList;
} else {
$arrayDispList = '';
return $arrayDispList;
}
return $arrayDispList;
}
开发者ID:THM068,项目名称:orangehrm,代码行数:39,代码来源:JobTitle.php
示例18: getEducation
function getEducation($getID)
{
$this->getID = $getID;
$tableName = 'HS_HR_EDUCATION';
$arrFieldList[0] = 'EDU_CODE';
$arrFieldList[1] = 'EDU_UNI';
$arrFieldList[2] = 'EDU_DEG';
$sql_builder = new SQLQBuilder();
$sql_builder->table_name = $tableName;
$sql_builder->flg_select = 'true';
$sql_builder->arr_select = $arrFieldList;
$sqlQString = $sql_builder->selectOneRecordFiltered($this->getID);
//echo $sqlQString;
$dbConnection = new DMLFunctions();
$message2 = $dbConnection->executeQuery($sqlQString);
//Calling the addData() function
$i = 0;
while ($line = mysql_fetch_array($message2, MYSQL_NUM)) {
$arrayDispList[$i][0] = $line[0];
$arrayDispList[$i][1] = $line[1];
$arrayDispList[$i][2] = $line[2];
$i++;
}
if (isset($arrayDispList)) {
return $arrayDispList;
} else {
$arrayDispList = '';
return $arrayDispList;
}
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:30,代码来源:Education.php
示例19: isUnfinishedTimesheet
public static function isUnfinishedTimesheet($timesheetId)
{
$selectTable = "`" . self::TIME_EVENT_DB_TABLE_TIME_EVENT . "`";
$selectFields[0] = "`" . self::TIME_EVENT_DB_FIELD_TIME_EVENT_ID . "`";
$selectConditions[0] = "`" . self::TIME_EVENT_DB_FIELD_DURATION . "` IS NULL";
$selectConditions[1] = "`" . self::TIME_EVENT_DB_FIELD_TIMESHEET_ID . "` = {$timesheetId}";
$sqlBuilder = new SQLQBuilder();
$query = $sqlBuilder->simpleSelect($selectTable, $selectFields, $selectConditions);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
if ($dbConnection->dbObject->numberOfRows($result) > 0) {
return true;
} else {
return false;
}
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:16,代码来源:TimeEvent.php
示例20: countUserGroups
function countUserGroups($schStr, $mode)
{
$arrFieldList[0] = 'userg_id';
$arrFieldList[1] = 'userg_name';
$sql_builder = new SQLQBuilder();
$sql_builder->table_name = $this->tableName;
$sql_builder->flg_select = 'true';
$sql_builder->arr_select = $arrFieldList;
$sqlQString = $sql_builder->countResultset($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];
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:16,代码来源:UserGroups.php
注:本文中的DMLFunctions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论