I have databases called Over_Pics (with a table called “Pic” with Columns ID, PicID) and Over_SeenPics (with a table called “Seen” with Columns Text, PicID)
How do I correctly write the join function for this?
$r = mysqli_query($link, "SELECT Pic.PicID FROM Pic LEFT JOIN Seen ON Pic.PicID=Seen.PicID");
Also should the db name in mysqil_connect be left blank, since I need to access to dbs rather than 1?
I think you just need to specify the DB before the table names, like this:
You can loop through the rows of the result set with this:
That will output the results of the query to the screen. Of course you will most likely want to change the formatting.