Hi,
i am inserting data in a mysql table like this:
INSERT INTO mytable1
(bu_main_id)
SELECT main_id FROM mytable2
WHERE username=\"$username\"
that's ok.
but now i would like to insert 2 values (bu_main_id and status), and i
would like to know, is it possible to use 2 or more SELECTs
together with an INSERT, for example:
INSERT INTO mytable1
(bu_main_id, status)
SELECT main_id FROM mytable2
WHERE username="$username",
SELECT config_mode FROM mytable3
WHERE config_value="status"
my 2nd question, is it possible to use UPDATE and (mulstiple)
SELECTs together
i.e.:
UPDATE mytable
SET xxx = (SELECT xxx from mytable2 WHERE config="yyy") ...
thanx
Mirza
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php