Execute On Query To Select Data From Multiple Tables

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shafiq2626
Forum Commoner
Posts: 88
Joined: Wed Mar 04, 2009 1:54 am
Location: Lahore
Contact:

Execute On Query To Select Data From Multiple Tables

Post by shafiq2626 »

Hi! Everybody.
I have 6 table i want to select data from these table to execute one Query.

First Table movieitem attribute moviid
second table movieinformation attribut moviid
third table shop attribut shoppingcart against moviid.
fourth table shoppingcart take customer id against moviid.
fifthe table customer customer id against fourth customr id
sixth purchase against customerid
please execute query.
thanks
tech603
Forum Commoner
Posts: 84
Joined: Thu Mar 19, 2009 12:27 am

Re: Execute On Query To Select Data From Multiple Tables

Post by tech603 »

You'll want to do this by using joins. Here is a tutorial that will help you better understand mysql joins. Basically using a join you'll be able to grab specific data from multiple tables using the criteria you have above.

http://www.tizag.com/mysqlTutorial/mysqljoins.php


Hope this helps.
Post Reply