![]() |
(11-04-2021, 10:19 PM)manager Wrote: In your example "where" is a clause, so it's NEED key/value pair. So the first row of code is wrong. https://codeigniter.com/user_guide/datab...html#where According to the QueryBuilder reference, the second parameter is optional. What I have is corrected and it's the equivalent of: PHP Code: $builder->where('item_id', null); It produces the SQL "WHERE item_id IS NULL" The only downside to using it as I have it, is that it's somewhat counter-intuitive that $builder->where('item_id') produces IS NULL and not IS NOT NULL. |
Messages In This Thread |
CI4 $this-db->Table() inside foreach or outside - by objecttothis - 11-04-2021, 02:08 AM
RE: CI4 $this-db->Table() inside foreach or outside - by manager - 11-04-2021, 06:24 AM
RE: CI4 $this-db->Table() inside foreach or outside - by objecttothis - 11-04-2021, 06:59 AM
RE: CI4 $this-db->Table() inside foreach or outside - by manager - 11-04-2021, 11:10 AM
RE: CI4 $this-db->Table() inside foreach or outside - by objecttothis - 11-04-2021, 11:31 AM
RE: CI4 $this-db->Table() inside foreach or outside - by manager - 11-04-2021, 10:19 PM
RE: CI4 $this-db->Table() inside foreach or outside - by objecttothis - 11-04-2021, 10:45 PM
RE: CI4 $this-db->Table() inside foreach or outside - by manager - 11-05-2021, 11:56 AM
RE: CI4 $this-db->Table() inside foreach or outside - by includebeer - 11-05-2021, 03:10 PM
RE: CI4 $this-db->Table() inside foreach or outside - by InsiteFX - 11-06-2021, 01:17 AM
|