git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8006 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ysnglee2000 2010-12-29 09:37:01 +00:00
parent 1fd8a07a79
commit 38fd867194

View file

@ -264,7 +264,7 @@
$output = $this->_fetch($result);
// if do not create serial
if ($output->count==0) {
if ($output->count == 0) {
$query = sprintf('select max("a"."srl") as "srl" from '.
'( select max("document_srl") as "srl" from '.
'"%sdocuments" UNION '.
@ -277,7 +277,7 @@
$result = $this->_query($query);
$output = $this->_fetch($result);
$srl = $output->srl;
if ($srl<1) {
if ($srl < 1) {
$start = 1;
}
else {
@ -285,7 +285,7 @@
}
// create sequence
$query = sprintf('create serial "%ssequence start with %s increment by 1 minvalue 1 maxvalue 10000000000000000000000000000000000000 nocycle;', $this->prefix, $start);
$query = sprintf('create serial "%ssequence" start with %s increment by 1 minvalue 1 maxvalue 10000000000000000000000000000000000000 nocycle;', $this->prefix, $start);
$this->_query($query);
}