2 Replies Latest reply on Oct 31, 2011 2:11 PM by philmodjunk

    View contents of record, selected by two conditions

    Corné

      Title

      View contents of record, selected by two conditions

      Post

      Hello all,

      I have linked FMP with an MySQL database of OScommerce. The products table of OSCommerce is built as follows:

      products_id       language_id         product_description
            1                    1                Product description in English
            1                    2                Product description in Dutch

      So apparently the primary key is products_id, but is not unique. How can I select the proper product_description field, based on the combination of the products_id and language_id? Thanks in advance!

      Best,
      Corné. 

        • 1. Re: View contents of record, selected by two conditions
          Corné

          Hm, I'm too sure no more if the products_id is not unique... That what it seems to be when I look at the MySQL data with the 'Sequel Pro' app. When I look at the data linked with the ActualTech ODBC driver, I see unique products ID's. Undecided I don't get it why Sequel Pro let's me see two products_id's, along with two language_id's. Perhaps Sequel Pro sees the relationship and shows me the according records??

          • 2. Re: View contents of record, selected by two conditions
            philmodjunk

            Perhaps you have more than one table and they are linked by Products_ID?

            In one table, you have one record per product and Products_ID would then be the primary key. In the other table you have different transalations of the various product descriptions. In that table, Products_ID is the foreign key.