How do I make an inner join to relate an article table to a favorite article table using cakephp 3.
favorites table:
CREATE TABLE IF NOT EXISTS 'favorites' (
'id' int(11) NOT NULL,
'user_id' int(11) NOT NULL,
'article_id' int(11) NOT NULL,
'favorited' datetime NOT NULL
)
article table:
CREATE TABLE IF NOT EXISTS 'articles' (
'id' int(11) NOT NULL,
'name' varchar(100) NOT NULL,
'content' text NOT NULL,
'created' datetime NOT NULL,
'modified' datetime NOT NULL
)