tas_pats Posted October 1, 2008 Report Share Posted October 1, 2008 (edited) Sveiki, man ir mysql datubāze ar divām tabulām: tabula1: id param_name tabula2: id param_id1 param_id2 param_id3 es nevaru izdomāt kā piesaistīt tabula2 tabulai katram parametru laukam nosaukumu (param_name) no tabulas tabula1. Ceru, ka sapratāt manu domu. Edited October 1, 2008 by tas_pats Link to comment Share on other sites More sharing options...
Grey_Wolf Posted October 1, 2008 Report Share Posted October 1, 2008 Ceru, ka sapratāt manu domu. Bez komatiem gruuti saprast ko domaa .. Bet vispar SQL ir taada lieta kaa JOIN Link to comment Share on other sites More sharing options...
Gints Plivna Posted October 1, 2008 Report Share Posted October 1, 2008 Atkarībā no tā vai tev tie IDi vienmēr ir aizpildīti vai nē, ieto vai nu iekšējo (inner) vai ārējo (outer) savienojumu kur 3 reizes savieno to pašu nosaukumu tabulu. Skat piemērus šeit Priekš inner join http://datubazes.wordpress.com/2008/02/25/inner-join/#p7 Priekš outer join http://datubazes.wordpress.com/2008/03/04/outer-join/#p8 Gints Plivna http://datubazes.wordpress.com Link to comment Share on other sites More sharing options...
Recommended Posts