I want to do a multiple select by lookup tables and then store the selected values to the main table.
How can I do this by PHPMaker?
thanks a lot
Cheers,
Anthony
I want to do a multiple select by lookup tables and then store the selected values to the main table.
How can I do this by PHPMaker?
thanks a lot
Cheers,
Anthony
Many thanks. Sorry because I am the beginner.
I just know 1 table field has to link up with the lookup table for 1 value and then store back to the table field.
For example:
id_no INT(2)
lookup_id INT(2) -> for storing 1 lookup value
lookup_id INT(2)
lookup_name VCHAR(30)
If for mulitple selected in lookup, how to store back to 1 table field or I need to create many field to store the selections?
please kindly advice.
It works, thanks a lot.
But I find another problem is "SELECT IN SELECT" problem in MySQL
1) the result of sql statment "SELECT rsa_lookup_id FROM rsa_policy_plan_lookup
WHERE rsa_plan_id=1" is equal to "11,12,16"
2) Runing in MySQL properly if the sql statment "SELECT rsa_eventNature_id, rsa_eventNature_name FROM rsa_eventnature WHERE rsa_eventNature_id IN (11,12,16) -> NO Problem~! 3 records showed
However, if I try to combine 1 & 2 into the sql statment "SELECT rsa_eventNature_id, rsa_eventNature_name FROM rsa_eventnature WHERE rsa_eventNature_id IN (SELECT rsa_lookup_id FROM rsa_policy_plan_lookup
WHERE rsa_plan_id=1) "
the result is not the same #2. Only 1 record
Why??? How to solve?
Much thanks.