Announcement

Collapse
No announcement yet.

select Lookup onchange event data in another field

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • select Lookup onchange event data in another field

    Hi all i need some help with selecting and lookup.

    I have 5 select fields, the first one needs to select the first level of a category then subcategories after, I have created fields call catl1,catl2,catl3,catl4,catl3. the category table (category) has id_category, id_parent and level_depth the table (category_lang) has the id_category and the 'name'

    I only want to display the name in the select dropdown not the id_category.

    I have created this mysql in lookup and it works fine in the first dropdown.

    SELECT
    category_lang.`name`,category.id_category
    FROM
    category,category_lang
    WHERE
    category.level_depth = 2 and category.id_parent = 2 and category_lang.id_category = category.id_category
    GROUP BY
    `name`

    My question is, the next category level is 3 and I need to show only names from category next level, in this case would be level_depth 3.

    can anyone help?

    Regards

  • #2
    Dont understand the problem. Change your condition in next field, for level depth 3
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      I have tried that, it works if I remove category_lang.`name`and only select id_category, but I need to show 'name' not id_category. Any Ideas?

      Comment


      • #4
        Originally posted by Mescart View Post
        I have tried that, it works if I remove category_lang.`name`and only select id_category, but I need to show 'name' not id_category. Any Ideas?
        Because first field is used on selects to use it as "ID" and second the field showed . You have to do the select as
        Code:
        SELECT
        category.id_category, category_lang.`name`
        /Giuseppe

        Professional Scriptcase Services
        Some Customers opinions

        Comment


        • #5
          Thanks you so much, its working.

          Comment


          • #6
            Closed as solved.
            /Giuseppe

            Professional Scriptcase Services
            Some Customers opinions

            Comment

            Working...
            X