Welcome Guest, Not a member yet? Register   Sign In
Update issue (Query Builder Class)
#5

Okey, my bad. I actually never tested it. Don't know exactly how join works, so here's how you can modify it to disable escaping instead.

https://pastebin.com/A5U7Y0i6
\system\database\DB_query_builder.php
Code:
1788:
public function get_compiled_update($table = '', $reset = TRUE, $escape = NULL)
1793:
if ($this->_validate_update($table, $escape) === FALSE)
1821:
public function update($table = '', $set = NULL, $where = NULL, $limit = NULL, $escape = NULL)
1831:
if ($this->_validate_update($table, $escape) === FALSE)
1863:
protected function _validate_update($table, $escape = NULL)
1872:
$this->qb_from = array($this->protect_identifiers($table, TRUE, $escape, FALSE));

Use it like this:
PHP Code:
$this->db->update('`table1` JOIN `table2` ON `table1id`=`table2id` JOIN `table3` ON `table2id`=`table3id`'$update_dataNULLNULLFALSE); 
Reply


Messages In This Thread
Update issue (Query Builder Class) - by ogomez - 07-05-2018, 05:59 PM
RE: Update issue (Query Builder Class) - by jreklund - 07-06-2018, 10:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB