Fixed Insert and UpdateExpression bugs - error : Call to a member function getValue() on a non-object in ./classes/db/queryparts/expression/UpdateExpression.class.php

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9101 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2011-09-07 17:07:13 +00:00
parent 81fea3d67d
commit f1c9668478
2 changed files with 12 additions and 10 deletions

View file

@ -1,32 +1,33 @@
<?php
<?php
/**
/**
* @class InsertExpression
* @author Arnia Software
* @brief
* @brief
*
*/
class InsertExpression extends Expression {
var $argument;
function InsertExpression($column_name, $argument){
parent::Expression($column_name);
$this->argument = $argument;
}
function getValue($with_values = true){
if($with_values)
return $this->argument->getValue();
return '?';
}
function show(){
$value = $this->argument->getValue();
if(!isset($value)) return false;
return true;
if(!$this->argument) return false;
$value = $this->argument->getValue();
if(!isset($value)) return false;
return true;
}
function getArgument(){
return $this->argument;
}

View file

@ -43,6 +43,7 @@
}
function show(){
if(!$this->argument) return false;
if(!$this->argument->getValue()) return false;
return true;
}