Dear all,
I’m going crazy to understand this problem.
I’ve got three table that are connected on cascade.
TABLE 1 (movmag)
– id
– article_id
TABLE 2 (article)
– id
– description
– mat_type_id
TABLE 3 (material_type)
– id
– description
I have a (movmag) TABLE1 form with article_id and
within this integer field I’ve inserted this lookup
SELECT descri
FROM article
WHERE id = {article_id}
ORDER BY descri
OK - correct description of article done
I have two new_fields text added where I would like to show material type id and description
NEW_FIELD1 text (I would like to take mat_type_id from article table TABLE 2)
SELECT mat_type_id
FROM article
WHERE id = ‘{article_id}’
ORDER BY id, descri
OK - correct id of material type done
NEW_FIELD2 text (I would like to show material type description TABLE 3)
SELECT id, descri
FROM material_type
WHERE id = ‘{NEW_FIELD1}’
ORDER BY descri
NOTHING DISPLAYED
Where is the mistake I did on last select? Is it not possible to have a variable reference in an added new_field ?
Many thanks
Giovannino
see image–> http://img814.imageshack.us/img814/6103/selectm.png