AV1611 Posted December 30, 2005 Share Posted December 30, 2005 Table 1 has fields a,b,c,d Table 2 has fields a,b,f,g Table 3 has fields a,h,f Can I join: table1 a - table2 a, table2 a - table3 a, table2 f - table3 f ??? (This is a leaning exersize on my part, so don't kill yourself!) I Can't figure this out. I know my query browser will allow me to make the links, but I don't really understand it well enough to use it... BUT, I did a three table query today without JOINS, and it took FOREVER!!! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/3125-multiple-joins/ Share on other sites More sharing options...
birdie Posted December 31, 2005 Share Posted December 31, 2005 erm you could make a script which copys the info from one table to another. like. $query = mysql_query("SELECT a FROM table1 WHERE row=a'"); $valuea = mysql_result($query, 0, "a"); mysql_query("INSERT INTO table1 (a) VALUES ($valuea)"); UPDATE This code might not work because of mysql_result but its just a quick code. Its just ideas. Hope i helped Quote Link to comment https://forums.phpfreaks.com/topic/3125-multiple-joins/#findComment-10499 Share on other sites More sharing options...
Arenium Posted December 31, 2005 Share Posted December 31, 2005 My favorite intro to JOINs: [a href=\"http://hashmysql.org/index.php?title=Introduction_to_Joins\" target=\"_blank\"]Intro[/a]; [a href=\"http://hashmysql.org/index.php?title=More_Advanced_Joins\" target=\"_blank\"]More Advanced[/a]. With a little bit of knowledge you can certainly accomplish this join entirely on your own. And since this is a learning exercise, that is the idea, no? Quote Link to comment https://forums.phpfreaks.com/topic/3125-multiple-joins/#findComment-10500 Share on other sites More sharing options...
fenway Posted December 31, 2005 Share Posted December 31, 2005 In the spirit of the learning exercise, I won't give you the answer -- just remember that for each relation, you need a set of tables and a join condition; that should help point you in the right direction, especially after reading those tutorials. Good luck! Quote Link to comment https://forums.phpfreaks.com/topic/3125-multiple-joins/#findComment-10504 Share on other sites More sharing options...
AV1611 Posted December 31, 2005 Author Share Posted December 31, 2005 ???? Those links are both dead??? :/ [!--quoteo(post=331750:date=Dec 30 2005, 10:37 PM:name=Arenium)--][div class=\'quotetop\']QUOTE(Arenium @ Dec 30 2005, 10:37 PM) 331750[/snapback][/div][div class=\'quotemain\'][!--quotec--] My favorite intro to JOINs: [a href=\"http://hashmysql.org/index.php?title=Introduction_to_Joins\" target=\"_blank\"]Intro[/a]; [a href=\"http://hashmysql.org/index.php?title=More_Advanced_Joins\" target=\"_blank\"]More Advanced[/a]. With a little bit of knowledge you can certainly accomplish this join entirely on your own. And since this is a learning exercise, that is the idea, no? Quote Link to comment https://forums.phpfreaks.com/topic/3125-multiple-joins/#findComment-10510 Share on other sites More sharing options...
fenway Posted December 31, 2005 Share Posted December 31, 2005 Must be a temporary outage -- the whole site seems like it's down for now, though it was working just fine yesterday. Quote Link to comment https://forums.phpfreaks.com/topic/3125-multiple-joins/#findComment-10513 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.