Closed ekarlso closed 12 years ago
So I found out that it's the expression buklder that apparantly breaks this when it does: return DB_Connection_Pool::instance()->get_connection($this->source)->escape_string($expr);
Ok, I will look into fixing this error in the Oracle plugin.
With some minor refactoring of the code, I am working on a solution based on the following article: http://www.orafaq.com/faq/how_does_one_escape_special_characters_when_writing_sql_queries.
Just improved the escape string function. Please note that the function has been renamed from escape_string($string) to quote($string, $like = FALSE).
$select->where("BELONGS_TO", "=", "X");
$select->page($this->page_offset, $this->page_limit); $select->where("BELONGS_TO", "=", "u333v"); $select->order_by($this->sort_column, $this->sort_direction);
This produced a SQL statement like:
SELECT * FROM (SELECT * FROM "SERVERS" WHERE "BELONGS_TO" = 0x7533333376 ORDER BY "SERVER" DESC) WHERE ROWNUM <= 20;
I think the 0x?.. there breaks the SELECT no?
Maybe some kind of error with the builder?