blue-mouse
Member
Hi,
I have a problem with update of my table1/list1,
table1 has fields:
id, login, name, email - and it has about 500records
for example:
48, jackb, Jack Blue, j.blue@candc.pl
I add some fields to table1: field11, field12, field13, ..., field20
Now i need update on table1 those : field11, field12, field13,..., field20 for all "about" 500 records -- with value from table2/list2.
table2/list2 has structure:
id, user_id, field_name, field_value
for example:
1, 48, field11, aaa_field11_value
2, 48, field12, bbb_field12_value
3, 49, field11, aaa_field11_value
4, 49, field20, kkk_field20_value
field_name has values: field11, field12, field13,..., field20
we should compare id.table1 with user_id.table2
I have a problem with SQL statue under phpmyadmin for each field11, field12, ...,field20
Can you help me to write right SQL for field11,
it should be something like this:
WHEN id.table1=user_id.table2 update field11.table1 with field_value.table2 WHERE field_name.table2=field11.table1
It is a bit to complicate for me... :-(
Is other way do the same under fabrik?
I have a problem with update of my table1/list1,
table1 has fields:
id, login, name, email - and it has about 500records
for example:
48, jackb, Jack Blue, j.blue@candc.pl
I add some fields to table1: field11, field12, field13, ..., field20
Now i need update on table1 those : field11, field12, field13,..., field20 for all "about" 500 records -- with value from table2/list2.
table2/list2 has structure:
id, user_id, field_name, field_value
for example:
1, 48, field11, aaa_field11_value
2, 48, field12, bbb_field12_value
3, 49, field11, aaa_field11_value
4, 49, field20, kkk_field20_value
field_name has values: field11, field12, field13,..., field20
we should compare id.table1 with user_id.table2
I have a problem with SQL statue under phpmyadmin for each field11, field12, ...,field20
Can you help me to write right SQL for field11,
it should be something like this:
WHEN id.table1=user_id.table2 update field11.table1 with field_value.table2 WHERE field_name.table2=field11.table1
It is a bit to complicate for me... :-(
Is other way do the same under fabrik?