I have 2 tables:
Table1
u_id email
1 user1@y.com
2 user2@h.com
and Table2
id u_id values
had to insert values to table2 with u_id when user enters from form Example:I need to add the value table1 u_id while that user is logged in into table2 that is id increments in table and u_id from table1 and values as user enters from table2
i tried something this query however not successful
insert into table2 (u_id,values)
values ((select u_id from table1), 'values')