INSERT and SELECT together in one statement
Posted: Tue Jun 12, 2007 9:57 am
Is it possible to do something like this:
... without doing the select statement separately?
It's not crucial or anything... I've already got a way around it. I'm just curious.
Code: Select all
INSERT INTO `newFeature` (`userid`, `data`, ...) VALUES((SELECT `id` FROM `users` WHERE `username` = '$username' AND `password` = '$password'), $data, ...);It's not crucial or anything... I've already got a way around it. I'm just curious.