예제 #1
0
function CCGetListValues(&$db, $sql, $where = "", $order_by = "", $bound_column = "", $text_column = "", $dbformat = "", $datatype = "", $errorclass = "", $fieldname = "", $DSType = dsSQL)
{
    $errors = new clsErrors();
    $values = "";
    if (!strlen($bound_column)) {
        $bound_column = 0;
    }
    if (!strlen($text_column)) {
        $text_column = 1;
    }
    if ($DSType == dsProcedure && $db->DB == "MSSQL" && count($db->Binds)) {
        $db->execute($sql);
    } else {
        $db->query(CCBuildSQL($sql, $where, $order_by));
    }
    if ($db->next_record()) {
        do {
            $bound_column_value = $db->f($bound_column);
            if ($bound_column_value === false) {
                $bound_column_value = "";
            }
            list($bound_column_value, $errors) = CCParseValue($bound_column_value, $dbformat, $datatype, $errors, $fieldname);
            $values[] = array($bound_column_value, $db->f($text_column));
        } while ($db->next_record());
    }
    if (is_string($errorclass)) {
        return $values;
    } else {
        $errorclass->AddErrors($errors);
        return array($values, $errorclass);
    }
}
예제 #2
0
 function GetParsedValue($ParsingValue, $MaskFormat)
 {
     return CCParseValue($ParsingValue, $MaskFormat, $this->DataType, "", "");
 }