Is it possible to do a `where id=(select id from table);` sql statement ? |
Hello,
I'd like to achieve this sql using the QueryBuilder class. Is it possible ? Code: UPDATE Series I'm currently using two different database calls (one select, one update), but since I'm using a very small amount of data, optimization is not a priority.
Actually learning CodeIgniter4 and creating a complex CMS system for fan-translations teams (Kagescan)
@LoganTann on GitHub // French // He-Him
Well, let's say I'm being curious, but why don't you run the inner select queries first, store the value in a variable, then run the other select or update separately using the already existing value from the saved variable?
Your query is too complex for the Query Builder. I think you should use query binding instead: https://codeigniter.com/user_guide/datab...y-bindings
|
Welcome Guest, Not a member yet? Register Sign In |