can anyone tell me to join two tables from database
my php query is :
SELECT * FROM `users` INNER JOIN registration ON users.id=registration.id WHERE users.id='7'
can anyone convert to Cakaphp 3.6.7
thanks & regards, Darshan
can anyone tell me to join two tables from database
my php query is :
SELECT * FROM `users` INNER JOIN registration ON users.id=registration.id WHERE users.id='7'
can anyone convert to Cakaphp 3.6.7
thanks & regards, Darshan
First of all you should use plural name for your model Registration. It should be Registrations.
You can use association for the same in Cakephp. First define your association in /src/Model/Table/UsersTable.php file.
Then query like this
Reference: https://book.cakephp.org/3.0/en/orm/associations.html