Mr. Marcus Posted October 16, 2006 Share Posted October 16, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/24139-joining/ Share on other sites More sharing options...
a2bardeals Posted October 17, 2006 Share Posted October 17, 2006 SELECT * FROM `DVD`,`COPIES` WHERE 1 Quote Link to comment https://forums.phpfreaks.com/topic/24139-joining/#findComment-109804 Share on other sites More sharing options...
a2bardeals Posted October 17, 2006 Share Posted October 17, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/24139-joining/#findComment-109807 Share on other sites More sharing options...
fenway Posted October 17, 2006 Share Posted October 17, 2006 [quote author=a2bardeals link=topic=111697.msg452888#msg452888 date=1161043811]SELECT * FROM `DVD`,`COPIES` WHERE 1[/quote]Never, ever, run a query like this... post your table structure, and I'll give you an example of a proper query. Quote Link to comment https://forums.phpfreaks.com/topic/24139-joining/#findComment-110096 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.