本文整理汇总了PHP中SQLQBuilder::quoteCorrectString方法的典型用法代码示例。如果您正苦于以下问题:PHP SQLQBuilder::quoteCorrectString方法的具体用法?PHP SQLQBuilder::quoteCorrectString怎么用?PHP SQLQBuilder::quoteCorrectString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SQLQBuilder
的用法示例。
在下文中一共展示了SQLQBuilder::quoteCorrectString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: filterExistingMembershipTypes
public function filterExistingMembershipTypes()
{
$selectFields[] = '`membtype_code`';
$selectFields[] = '`membtype_name`';
$selectTable = $this->tableName;
$sqlBuilder = new SQLQBuilder();
$description = $sqlBuilder->quoteCorrectString($this->getMemDescription());
$selectConditions[] = "`membtype_name` = {$description}";
$query = $sqlBuilder->simpleSelect($selectTable, $selectFields, $selectConditions);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
$cnt = 0;
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$existingMembershipTypes[$cnt++] = $row;
}
if (isset($existingMembershipTypes)) {
return $existingMembershipTypes;
} else {
$existingMembershipTypes = '';
return $existingMembershipTypes;
}
}
示例2: filterExistingCustomers
public function filterExistingCustomers()
{
$sqlBuilder = new SQLQBuilder();
$customerName = $sqlBuilder->quoteCorrectString($this->getCustomerName(), true, true);
$selectFields[] = '`customer_id`';
$selectFields[] = '`name`';
$selectTable = self::TABLE_NAME;
$selectConditions[] = "`name` = '{$customerName}'";
$query = $sqlBuilder->simpleSelect($selectTable, $selectFields, $selectConditions);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
$cnt = 0;
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$existingCustomers[$cnt++] = $row;
}
if (isset($existingCustomers)) {
return $existingCustomers;
} else {
$existingCustomers = '';
return $existingCustomers;
}
}
示例3: filterExistingEducations
public function filterExistingEducations()
{
$selectFields[] = '`edu_code`';
$selectFields[] = '`edu_uni`';
$selectFields[] = '`edu_deg`';
$selectTable = $this->tableName;
$sqlBuilder = new SQLQBuilder();
$institute = $sqlBuilder->quoteCorrectString($this->getEduUni(), true, true);
$course = $sqlBuilder->quoteCorrectString($this->getEduDeg(), true, true);
$selectConditions[] = "`edu_deg` = '{$course}'";
$selectConditions[] = "`edu_uni` = '{$institute}'";
$query = $sqlBuilder->simpleSelect($selectTable, $selectFields, $selectConditions);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
$cnt = 0;
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$existingEducations[$cnt++] = $row;
}
if (isset($existingEducations)) {
return $existingEducations;
} else {
$existingEducations = '';
return $existingEducations;
}
}
示例4: filterExistingProjects
public function filterExistingProjects()
{
$sqlBuilder = new SQLQBuilder();
$projectName = $sqlBuilder->quoteCorrectString($this->getProjectName(), true, true);
$selectFields[] = "`" . self::PROJECT_DB_FIELD_PROJECT_ID . "`";
$selectFields[] = "`" . self::PROJECT_DB_FIELD_CUSTOMER_ID . "`";
$selectFields[] = "`" . self::PROJECT_DB_FIELD_NAME . "`";
$selectTable = self::TABLE_NAME;
$selectConditions[] = "`" . self::PROJECT_DB_FIELD_CUSTOMER_ID . "`= '" . $this->getCustomerId() . "'";
$selectConditions[] = "`" . self::PROJECT_DB_FIELD_NAME . "`= '{$projectName}'";
$query = $sqlBuilder->simpleSelect($selectTable, $selectFields, $selectConditions);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
$cnt = 0;
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$existingProjects[$cnt++] = $row;
}
if (isset($existingProjects)) {
return $existingProjects;
} else {
$existingProjects = '';
return $existingProjects;
}
}
示例5: getDistrictCodes
function getDistrictCodes($getID)
{
$sql_builder = new SQLQBuilder();
$this->getID = $sql_builder->quoteCorrectString($getID, false);
$tableName = 'HS_HR_DISTRICT';
$arrFieldList[0] = 'PROVINCE_CODE';
$arrFieldList[1] = 'DISTRICT_CODE';
$arrFieldList[2] = 'DISTRICT_NAME';
$sql_builder->table_name = $tableName;
$sql_builder->flg_select = 'true';
$sql_builder->arr_select = $arrFieldList;
$sqlQString = $sql_builder->selectOneRecordFiltered($this->getID);
$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;
}
}
示例6: filterExistingMembershipInfo
public function filterExistingMembershipInfo()
{
$tableName = 'hs_hr_membership';
$selectFields[] = '`membship_code`';
$selectFields[] = '`membtype_code`';
$selectFields[] = '`membship_name`';
$selectTable = $tableName;
$sqlBuilder = new SQLQBuilder();
$name = $sqlBuilder->quoteCorrectString($this->getMembershipInfoDesc());
$selectConditions[] = "`membtype_code` = '" . $this->getMembershipTypeId() . "'";
$selectConditions[] = "`membship_name` = {$name}";
$query = $sqlBuilder->simpleSelect($selectTable, $selectFields, $selectConditions);
$dbConnection = new DMLFunctions();
$result = $dbConnection->executeQuery($query);
$cnt = 0;
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$existingMembershipInfo[$cnt++] = $row;
}
if (isset($existingMembershipInfo)) {
return $existingMembershipInfo;
} else {
$existingMembershipInfo = '';
return $existingMembershipInfo;
}
}