mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 08:49:56 +09:00
long text 조정 루틴 추가
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1946 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d5a30ce8ca
commit
0298a2f38d
1 changed files with 33 additions and 2 deletions
|
|
@ -20,6 +20,7 @@
|
|||
var $database = NULL; ///< database
|
||||
var $port = 33000; ///< db server port
|
||||
var $prefix = 'xe'; ///< 제로보드에서 사용할 테이블들의 prefix (한 DB에서 여러개의 제로보드 설치 가능)
|
||||
var $cutlen = 12000; ///< 큐브리드의 최대 상수 크기(스트링이 이보다 크면 '...'+'...' 방식을 사용해야 한다
|
||||
|
||||
/**
|
||||
* @brief cubrid에서 사용될 column type
|
||||
|
|
@ -365,7 +366,21 @@
|
|||
$name = $val['name'];
|
||||
$value = $val['value'];
|
||||
if($this->getColumnType($output->column_type,$name)!='number') {
|
||||
$value = "'".$this->addQuotes($value)."'";
|
||||
$clen=strlen($value);
|
||||
if ($clen <= $this->cutlen)
|
||||
$value = "'".$this->addQuotes($value)."'";
|
||||
else {
|
||||
$wrk="";
|
||||
$off=0;
|
||||
while ($off<$clen) {
|
||||
$wlen=$clen-$off;
|
||||
if ($wlen>$this->cutlen) $wlen=$this->cutlen;
|
||||
if ($off>0) $wrk .= "+\n";
|
||||
$wrk .= "'".$this->addQuotes(substr($value, $off, $wlen))."'";
|
||||
$off += $wlen;
|
||||
}
|
||||
$value = $wrk;
|
||||
}
|
||||
if(!$value) $value = 'null';
|
||||
} elseif(!$value || is_numeric($value)) $value = (int)$value;
|
||||
|
||||
|
|
@ -394,7 +409,23 @@
|
|||
$value = $val['value'];
|
||||
if(strpos($name,'.')!==false&&strpos($value,'.')!==false) $column_list[] = $name.' = '.$value;
|
||||
else {
|
||||
if($output->column_type[$name]!='number') $value = "'".$this->addQuotes($value)."'";
|
||||
if($output->column_type[$name]!='number') {
|
||||
$clen=strlen($value);
|
||||
if ($clen <= $this->cutlen)
|
||||
$value = "'".$this->addQuotes($value)."'";
|
||||
else {
|
||||
$wrk="";
|
||||
$off=0;
|
||||
while ($off<$clen) {
|
||||
$wlen=$clen-$off;
|
||||
if ($wlen>$this->cutlen) $wlen=$this->cutlen;
|
||||
if ($off>0) $wrk .= "+\n";
|
||||
$wrk .= "'".$this->addQuotes(substr($value, $off, $wlen))."'";
|
||||
$off += $wlen;
|
||||
}
|
||||
$value = $wrk;
|
||||
}
|
||||
}
|
||||
elseif(!$value || is_numeric($value)) $value = (int)$value;
|
||||
|
||||
$column_list[] = sprintf("\"%s\" = %s", $name, $value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue