Fixed join condidition bug: if the user specifies the "pipe" attribute of a condition in a join cause, it should be ignored (otherwise the sql string is like INNER JOIN ... ON AND a = b). Fixed order by bug.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8387 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
mosmartin 2011-05-20 12:24:50 +00:00
parent 520300fad1
commit d3067703a4
10 changed files with 31 additions and 12 deletions

View file

@ -19,8 +19,9 @@
if(!isset($this->value)) return;
$str_pos = strpos($this->value, '(');
// TODO Replace this with parseExpression
if($str_pos===false) return '"'.$this->value.'"';
// // TODO Replace this with parseExpression
if($str_pos===false) return '\''.$this->value.'\'';
//if($str_pos===false) return $this->value;
$func_name = substr($this->value, 0, $str_pos);
$args = substr($this->value, $str_pos+1, strlen($value)-1);
@ -52,7 +53,8 @@
$val = sprintf('"%s*%d"', $this->column_name, $args);
break;
default :
$val = '"' . $this->value . '"';
$val = '\'' . $this->value . '\'';
//$val = $this->value;
}
return $val;