Page 1 of 1

Execute On Query To Select Data From Multiple Tables

Posted: Tue May 12, 2009 7:06 am
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

Re: Execute On Query To Select Data From Multiple Tables

Posted: Wed May 13, 2009 7:11 pm
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.