I am trying to query 6 separate tables in my mysql database, the structures are as follows;
item
itemitemid | item | description | brand | date | time | path |
actor
actoractorid | name | actorthumb | bio |
brand
brandbrandid | brandname | description | image |
movie
moviemovieid | title | genre | year | moviethumb | synopsis|
user
userid | name | surname | email | password |
request
requestid | userid | itemid | brandid | movieid | actorid | content | requestdate |
By clicking a link to a page called style.php using the get commands I can view the request and the info within it by pulling it from the joined tables. For example where the requestid=1 I can see the movie in the request, the actor in the movie, the item of clothing they were wearing and its brand. By using the following 4 querys;
Movie
$requestid = $_GET['requestid'];
$query = "SELECT * FROM movie, request WHERE movie.movieid =
request.movieid and requestid = ".$requestid;
Actor
$requestid = $_GET['requestid'];
$query = "SELECT * FROM actor, request WHERE actor.actorid =
request.actorid and requestid = ".$requestid;
Item
$requestid = $_GET['requestid'];
$query = "SELECT * FROM item, request WHERE item.itemid =
request.itemid and requestid = ".$requestid;
Brand
$requestid = $_GET['requestid'];
$query = "SELECT * FROM brand, request WHERE brand.brandid =
request.brandid and requestid = ".$requestid;
Therefore I would like to combine the 4 querys above into 1 single query that would allow me to show all the info, including querying the user and request tables to show who logged the request, please advise?