You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public function getSthByDomainId($domain_id) {
$this->[WITH or WITHOUT builder() HERE]->select('sth_id')
->where('sth1_sth_id', "(SELECT `aaa_bbb_id` FROM `t_abc` WHERE `aaa_id` = " . $this->db->escapeString($domain_id) .")", FALSE)
->get()
->getResult();
d($this->db->getLastQuery());
produces escaped query instead of FALSE passing as a third parameter of ->where method.
Edit after a minute:
OK everything is ok when as second parameter we will pass NULL as is in docs, but anyway will be more useful if we would be able to pass field name as first parameter, subquery as second and false as third.
The text was updated successfully, but these errors were encountered:
I can see how that might be useful in this particular case, but causes issues with other cases, I believe. And this is the way that CI has been since the beginning I believe. Glad you got it working, though.
produces escaped query instead of FALSE passing as a third parameter of ->where method.
SELECT
sth_idFROM
t_sth_sthWHERE sth1_sth_id = '\(SELECT
aaa_bbb_idFROM
t_abcWHERE
aaa_id\= 1\)'
Edit after a minute:
OK everything is ok when as second parameter we will pass NULL as is in docs, but anyway will be more useful if we would be able to pass field name as first parameter, subquery as second and false as third.
The text was updated successfully, but these errors were encountered: