Jump to content


Photo

joining


  • Please log in to reply
3 replies to this topic

#1 Mr. Marcus

Mr. Marcus
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 16 October 2006 - 08:21 PM

I got a db that presents a dvd shop.
what query do i need if i want to display every copy of the dvd's that the shop owns in the querybrowser.
so i have a table DVD and a table COPIES.
i think i will need a join but thats all i know. :-\

thx anyway,
marcus

#2 a2bardeals

a2bardeals
  • Members
  • PipPipPip
  • Advanced Member
  • 62 posts
  • LocationAnn Arbor, MI

Posted 17 October 2006 - 12:10 AM

SELECT * FROM `DVD`,`COPIES` WHERE 1

#3 a2bardeals

a2bardeals
  • Members
  • PipPipPip
  • Advanced Member
  • 62 posts
  • LocationAnn Arbor, MI

Posted 17 October 2006 - 12:14 AM

by the way...why dont you just have a table called dvds with fields named 'TITLE' and 'COPIES' then you could just call the results as one table select like: "SELECT title, copies FROM DVDS WHERE 1

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 17 October 2006 - 03:45 PM

SELECT * FROM `DVD`,`COPIES` WHERE 1

Never, ever, run a query like this... post your table structure, and I'll give you an example of a proper query.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users