php - select from multiple table and write on one table w3schools -


i want select multiple table , write on 1 table:

insert interest_area (category_id, user_id)         select category_id category         category_name = 'html'          union         select user_id users         first_name = 'memar'; 

but couldn't write.

change query like

insert interest_area (category_id, user_id)     select category_id,user_id category c,users u     c.category_name = 'html' , u.first_name = 'memar'; 

Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -