X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fpq-gateway;a=blobdiff_plain;f=lib%2Fpq%2FQuery%2FExpr.php;h=0f3d86e52ba1db3ae3cfb99ca9391e7f3e2396e1;hp=ae87c1f92abe4b4bdd4d20f1cc6d5c2d9f9b6ce0;hb=e2709f3f6de6d5c5ba272d353db16b015b5258b3;hpb=01bd45d05ce58796db7540d60671b8cff5d46bff diff --git a/lib/pq/Query/Expr.php b/lib/pq/Query/Expr.php index ae87c1f..0f3d86e 100644 --- a/lib/pq/Query/Expr.php +++ b/lib/pq/Query/Expr.php @@ -18,7 +18,7 @@ class Expr * @param string $e the expression or a format string followed by arguments * @param string ... */ - function __construct($e) { + function __construct($e, $arg = null) { if (func_num_args() > 1) { $e = call_user_func_array("sprintf", func_get_args()); } @@ -30,7 +30,11 @@ class Expr * @return string */ function __toString() { - return (string) $this->expression . $this->next; + $string = $this->expression; + if ($this->next) { + $string .= " " . $this->next; + } + return (string) $string; } /**