insert ... select ... multiple cols
Posted: Sun Jan 18, 2004 7:16 pm
you can probably guess from this what i'm tryin' to do...
do i just need to do this:
and is there a way to combine two queries like that...?
thanks
g
Code: Select all
INSERT INTO titles( recID, title )
VALUES ( 'SELECT recID
FROM user
WHERE username = glennn', '$file_name' );Code: Select all
$query="insert into titles (recID) select recID from user where username='$username' ";
$query1="insert into titles (title) values ('$file_name');thanks
g