hi,
i have 2 mysql tables
first one is user table and its fields are as follows
id--userfield1--userfield2--userfield3
1--87878978--56564545--53342323
second table is user_values and it's fields are
user_id--field_id---field_value
1.here i want to write a insert query such that i can fetch the id from users table and store in user_values.user_id
2.the field_id value should be 1 for userfield1 and 2 for userfield2 and 3 for userfield3 in user_values table
3.fetch the userfield1 value from user and store it in field_value of user_value.finally user_values table should like this
user_id--field_id---field_value
1---1---87878978
1---2---56564545
1---3---53342323.
2---1---99999999
2---2---88888888
2---3---66666666
i have 10 records in user table.how i can fetch and store these values.please guide me how i can do this.
thankig you
mrjameer.