Issue 1819: CUBRID prepare statement error

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10525 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2012-04-02 15:36:50 +00:00
parent f0eecb4809
commit c2df2f3a45
10 changed files with 201 additions and 71 deletions

View file

@ -63,22 +63,33 @@
}
}
/**
* Since ConditionArgument is used in WHERE clause,
* where the argument value is compared to a table column,
* it is assumed that all arguments have type. There are cases though
* where the column does not have any type - if it was removed from
* the XML schema for example - see the is_secret column in xe_documents table.
* In this case, the column type is retrieved according to argument
* value type (using the PHP function is_numeric).
*
* @return type string
*/
function getType(){
return $this->type ? $this->type : (!is_numeric($this->value) ? "varchar" : "");
/**
* Since ConditionArgument is used in WHERE clause,
* where the argument value is compared to a table column,
* it is assumed that all arguments have type. There are cases though
* where the column does not have any type - if it was removed from
* the XML schema for example - see the is_secret column in xe_documents table.
* In this case, the column type is retrieved according to argument
* value type (using the PHP function is_numeric).
*
* @return type string
*/
function getType(){
if($this->type)
{
return $this->type;
}
else if(!is_numeric($this->value))
{
return 'varchar';
}
else
{
return '';
}
}
function setColumnType($column_type){
function setColumnType($column_type){
if(!isset($this->value)) return;
if($column_type === '') return;