link_operator = sanitise_string($link_operator); $this->left_table = $CONFIG->dbprefix . sanitise_string($left_table); $this->left_field = sanitise_string($left_field); $this->operator = sanitise_string($operator); $this->right_table = $CONFIG->dbprefix . sanitise_string($right_table); $this->right_field = sanitise_string($right_field); } /** * Return the SQL without the link operator. */ public function toStringNoLink() { return "{$this->left_table }.{$this->left_field} {$this->operator} {$this->right_table}.{$this->right_field}"; } function __toString() { return "{$this->link_operator} " . $this->toStringNoLink(); } }