CI4 Models and Table Joins |
I'm using a cross reference table to have a many to many relationship in a database. With the CI4 model, the table name and table columns are specified. Is there a CI-standard way to combine three tables?
i.e. a better way of doing this? select * from products JOIN xref_prod_cat ON products.id = xref_prod_cat.product JOIN categories ON xref_prod_cat.category = categories.id WHERE categories.name = "some search term" |
Messages In This Thread |
CI4 Models and Table Joins - by rockinmusicgv - 02-07-2022, 01:22 PM
RE: CI4 Models and Table Joins - by php_rocs - 02-07-2022, 02:50 PM
RE: CI4 Models and Table Joins - by rockinmusicgv - 02-07-2022, 03:57 PM
RE: CI4 Models and Table Joins - by rockinmusicgv - 02-07-2022, 10:34 PM
RE: CI4 Models and Table Joins - by php_rocs - 02-08-2022, 08:11 AM
RE: CI4 Models and Table Joins - by rockinmusicgv - 02-10-2022, 10:36 PM
RE: CI4 Models and Table Joins - by php_rocs - 02-11-2022, 07:29 AM
|