relations between tables
Theanoula <[email protected]> Sun, 03 Mar 2013 20:48:36 +0200
| Newsgroups | gmane.comp.gnu.enterprise.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============7020520718517358785== Content-Type: multipart/alternative; boundary="------------090708080103020007020006" This is a multi-part message in MIME format. --------------090708080103020007020006 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello! I'd like to ask you something that I have been trying to figure out. I have 3 tables that I connect with each other. Here is the relationship: <datasource name="dts_customer" connection="gnue" table="transactor" /> <datasource name="dts_cars" connection="gnue" table="cars" master="dts_customer" masterlink="id" detaillink="customer_id" /> <datasource name="dts_contract" connection="gnue" table="contract" master="dts_cars" masterlink="id" detaillink="car_id" /> I have created the primary and foreign keys in the database. When I search(in the form) in dts_customer.name I get all the info I need. The same happens when I search in dts_cars.car_number(I get everything) but when I search in dts_contract.contract_no I don't get the right info. In mysql Log I see that it always uses the query "Select * from transactor where id=(Select...)" Do I do something wrong or is it the relationship? Is such a relationship possible? A to B, B to C eventually A to C and reverse Thanks in advance. I'd really appreciate an answer. Regards Thea --------------090708080103020007020006 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8"> </head> <body bgcolor=3D"#ffffff" text=3D"#000000"> Hello!<br> <br> I'd like to ask you something that I have been trying to figure out. I have 3 tables that I connect with each other. Here is the relationship:<b= r> <br> <datasource name=3D"dts_customer" connection=3D"gnue" table=3D"transac= tor" /><br> <br> <span style=3D"font-weight: bold; color: rgb(204, 0, 0);"></span><data= source name=3D"dts_cars" connection=3D"gnue" table=3D"cars"<br> <span style=3D"font-weight: bold; color: rgb(204, 0, 0);">=C2=A0</span>ma= ster=3D"dts_customer" masterlink=3D"id" detaillink=3D"customer_id" /><br> <span style=3D"font-weight: bold; color: rgb(204, 0, 0);"></span><br> <span style=3D"font-weight: bold; color: rgb(204, 0, 0);"></span><data= source name=3D"dts_contract" connection=3D"gnue" table=3D"contract"<br> <span style=3D"font-weight: bold; color: rgb(204, 0, 0);"></span>=C2=A0ma= ster=3D"dts_cars" masterlink=3D"id" detaillink=3D"car_id" /><br> <br> <br> I have created the primary and foreign keys in the database.<br> When I search(in the form) in dts_customer.name I get all the info I need. The same happens when I search in dts_cars.car_number(I get everything) but when I search in dts_contract.contract_no I don't get the right info.<br> <br> In mysql Log I see that it always uses the query "Select * from transactor where id=3D(Select...)"<br> <br> Do I do something wrong or is it the relationship? Is such a relationship possible? A to B, B to C eventually A to C and reverse <br> <br> Thanks in advance. I'd really appreciate an answer.<br> <br> Regards<br> Thea<br> <br> </body> </html> --------------090708080103020007020006-- --===============7020520718517358785== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ gnue-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnue-dev --===============7020520718517358785==--