Hey all,
i have a little difficulty in understanding how to do some INSERT SELECT.
For instance i have two tables.
TABLE : users
id | name | gender
1 | John | m
2 | Mary | f
TABLE : website
fid | url | id
1 | www.desilva.biz | 2
2 | gidhelp.com | 4
Now let's say i want to add another query to the table website. I get two variables, lets say:
$user = John;
$site = "www.google.com";
i want to select the id of John from users table and insert it into website table in one statement.
How can i do it?