This is a shopping basket where the user can add the item to the watchlist. You have a separate page from the "User" list, where all the apepears products that have been added to the watchlist by this particular user. product_imagesthe table is separate from the product table, since 1 image can have multiple images.
MySQL Tables
Table "product" :
pid(pk),name,price, etc...
Table "watchlist" :
wid(pk),pid(fk),userid(fk)
Table "p_images" :
image_id(pk),pid(fk),image_name
I want to get all the information from the table productand only the 1st image of this particular product from the table p_images. The product must be extracted pid in the table watchlist.
source
share