djjjozsi;10948411 wrote:Lets make a sample image what do you want to achieve 🙂
I thought you need to make a listbox, populated from a MYSQL table,
and if you select one element you insert the record into textfields.
Hi,
I have done this with the code above, but I now need a listbox to be populated as well as the other text fields (based on my selection from the first list box), but the list box needs to be populated with more than one option.
Basically I have a product table and a productdetail table (1 to many relationship), when I select a product from the listbox I have made it populate text fields with that products data from the product table, but I also need a listbox to be populated with all the productdetailnames from the productdetail table. Then when I select a productdetailname (such as height) it will populate a textfield with its value (such as 10cm) from the productdetail table.
The prodid is a foreign key in the productdetail table so I should be able to find out what productdetailnames are appropriate for the product.
Example of data:
PRODUCT(prodiid = 1, prodname = box)
PRODUCTDETAIL(proddetid = 1, prodid = 1, proddetailname = height, proddetailvalue = 10cm)
(proddetid = 2, prodid = 1, proddetailname = width, proddetailvalue = 20cm)
hope this helps your understanding so you can help me.