git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7428 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ysnglee2000 2010-05-10 18:58:19 +00:00
parent 6b167366a7
commit 7f988932f0

View file

@ -172,9 +172,27 @@
function _fetch($result) {
if(!$this->isConnected() || $this->isError() || !$result) return;
$col_types = cubrid_column_types ($req);
$col_names = cubrid_column_names ($req);
if (($max = count ($col_types)) == count ($col_names)) {
$count = 0;
while ($count < $max) {
if (preg_match ("/^char/", $col_types[$count]) > 0) {
$char_type_fields[] = $col_names[$count];
}
$count++;
}
}
while($tmp = cubrid_fetch($result, CUBRID_OBJECT)) {
if (is_array ($char_type_fields)) {
foreach ($char_type_fields as $val) {
$tmp->{$val} = rtrim ($tmp->{$val});
}
}
$output[] = $tmp;
}
unset ($char_type_fields);
if($result) cubrid_close_request($result);