mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 10:49:54 +09:00
Updated WHERE clause to ignore expressions when the argument value is not set.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8386 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
0f61e5d499
commit
520300fad1
6 changed files with 18 additions and 12 deletions
|
|
@ -95,7 +95,6 @@ class QueryParser {
|
|||
}
|
||||
|
||||
function toString(){
|
||||
// TODO Add tags for update, insert ..
|
||||
if($this->action == 'select'){
|
||||
$columns = new SelectColumnsTag($this->query->columns->column, $this->dbParser);
|
||||
}else if($this->action == 'insert'){
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
}
|
||||
|
||||
function escapeValue($column_type){
|
||||
if(!isset($this->value)) return;
|
||||
if($column_type === '') $column_type = 'varchar';
|
||||
if(in_array($column_type, array('date', 'varchar', 'char')))
|
||||
$this->value = '\''.$this->value.'\'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
$xml_groups = $xml_conditions->group;
|
||||
if($xml_groups){
|
||||
if(!is_array($xml_groups)) $xml_groups = array($xml_groups);
|
||||
require_once(_XE_PATH_.'classes/xml/xmlquery/tags/condition/ConditionGroupTag.class.php');
|
||||
foreach($xml_groups as $group){
|
||||
$this->condition_groups[] = new ConditionGroupTag($group->condition, $this->dbParser, $group->pipe);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue