rhymix/classes/db/queryparts/expression/UpdateExpressionWithoutArgument.class.php
flyskyko e4306a789f Merge 1.5.2.3 (~r10623)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@10624 201d5d3c-b55e-5fd7-737f-ddc643e51545
2012-04-26 09:17:29 +00:00

45 lines
No EOL
970 B
PHP

<?php
/**
* @class UpdateExpression
* @author Arnia Software
* @brief
*
*/
class UpdateExpressionWithoutArgument extends UpdateExpression {
var $argument;
function UpdateExpressionWithoutArgument($column_name, $argument){
parent::Expression($column_name);
$this->argument = $argument;
}
function getExpression($with_value = true){
return "$this->column_name = $this->argument";
}
function getValue(){
// TODO Escape value according to column type instead of variable type
$value = $this->argument;
if(!is_numeric($value)) return "'".$value."'";
return $value;
}
function show(){
if(!$this->argument) return false;
$value = $this->argument;
if(!isset($value)) return false;
return true;
}
function getArgument(){
return null;
}
function getArguments(){
return array();
}
}
?>