473,395 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

mysql sql multi join question

hello i am a novice at database design and i'm having trouble doing a
multi join in mysql, i was able to do a inner join with
just the venues and productions tables below like so

SELECT productions.PID, productions.EID,productions.OID, venues.Name,
venues.VID, venues.City, venues.State, productions.P_Date
FROM productions
INNER JOIN venues ON productions.VID = venues.VID
where productions.VID=50

i want to join all 3 tables so that i can present them all different
sorts of ways in html tables, but i haven't been able to get
the sql statement to execute, i basically want it so that i can get i
can do something like

SELECT events.EID,productions.PID, productions.EID,productions.OID,
venues.Name,
venues.VID, venues.City, venues.State, productions.P_Date
FROM productions
INNER JOIN venues ON productions.VID = venues.VID
INNER JOIN events ON productions.EID = events.EID
where productions.VID=50

i tried doing AND and tried doing different types of joins also but
i'm getting errors and figured that someone maybe be able to explain
how i can go about doing this in the best manner.

here are the tables below:

events table
-------------
Field Type Attributes Null Default Extra Action
EID smallint(6) No 0
E_Name varchar(250) No
E_Type tinyint(4) No 0

venues table

Field Type Attributes Null Default Extra Action
VID smallint(6) No 0
Name varchar(255) No
City varchar(200) No
State char(2) No
ZipCode varchar(7) No
RegionId smallint(6) Yes 0
MarketId smallint(6) Yes 0

productions table
---------------------
Field Type Attributes Null Default Extra Action
PID mediumint(9) No 0
OID smallint(6) No 0
EID smallint(6) No 0
VID smallint(6) No 0
P_Date datetime No 0000-00-00 00:00:00
thanks, Tom
Jul 20 '05 #1
0 1507

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Xenophobe | last post by:
I know this isn't a MySQL forum, but my question is related to a PHP project. I have two tables. table1 table2 "table1" contains 2 columns, ID and FirstName:
23
by: phpfrizzle | last post by:
Hi there, I have a site with products on it. The site has a mysql backend. All products belong to certain series (table series). There can be up to 4 different products (table products)...
0
by: Randell D. | last post by:
Folks, I have installed MySQL v4 (client, server and development rpm's). I've tried and failed to use the recommended mysqladmin to set a root password after the installation (I have another post...
0
by: Lenz Grimmer | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, MySQL 4.0.14, a new version of the popular Open Source/Free Software Database, has been released. It is now available in source and binary...
5
by: Bob Bedford | last post by:
Hello all, I'm creating an invoice process for my website. I'm trying to show the invoice processing on a simple way. Let's explain how: I'm creating a table with the first column having...
7
by: Jon Maz | last post by:
Hi, I have a MySql problem I hope someone can help me with. I'm trying to run an update on a linking table, the update is running into a Primary Key constraint violation, and in my workaround...
0
by: Bucker | last post by:
Could someone view the following that I copied from phpMyAdmin and tell me from the statistics if are server is running OK? Does it look like we will have problems as more people hit our server?...
3
by: menzies | last post by:
Hi, I"m new to this forum, but I have been trying all day to install DBD::mysql onto my Intel MacBook. I've read lots of forums pages and none have gotten me to a successful 'make test' or a...
0
by: jllanten | last post by:
I will appreciate any help you can provide me. In the company where i work we have a project which creates about 4-5M records daily of stats. We're currently storing this data in a db named...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.