I have two tables:
CREATE TABLE users(
userID int primary key not null auto_increment,
username varchar(16),
passcode varchar(16),
email varchar(50) not null
);
CREATE TABLE favorites(
userID int not null,
favID1 varchar(50) not null,
favID2 varchar(50) not null,
favID3 varchar(50) not null,
favID4 varchar(50) not null,
favID5 varchar(50) not null,
favID6 varchar(50) not null,
favID7 varchar(50) not null,
favID8 varchar(50) not null,
favID9 varchar(50) not null,
favID10 varchar(50) not null,
favID11 varchar(50) not null,
favID12 varchar(50) not null,
FOREIGN KEY fk1(userID) REFERENCES users(userID)
);
And I would like to get the contents of the favorites table with just the username from the users table, what would the statement for it look like? I'm fairly new to SQL and databases, so apologies if this is trivial. Every other resource I've looked at doesn't seem to relate to what I want to do.