Cannot reach id from table when using SELECT JOIN
Hello, I have a problem to select the id from the filmer-table when I use JOIN in the SQL-string below. At the moment I only reach the id from the regissorer-table, but I want to reach both id:s from both tables. The thing is that I want to point to a specific movie using its id from the filmer-table in a link, but I also need to be able to point to the regissorer_id to be able to print out names of directors in text.
So, does someone know if this could be fixed in the same SQL-string, like adding some SQL-code to it so I can select both id:s? Would be thankful if someone could help me with this.
$sql = "SELECT * FROM filmer JOIN regissorer ON regissorer.id = filmer.regissor_id";
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)