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 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 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 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. Link to comment https://forums.phpfreaks.com/topic/24139-joining/#findComment-110096 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.