Is it possible to insert data with a specific id that is unknown while the reference to that id is known?
Example:
I got a car type and I know the name but I don’t know the ID of it.
In the database it known as: FooBarCar 13
Now I want to insert FooBarCar in some reference table but I dont know the id yet. Is it possible to write this into one query/subquery or do I have to select this first in a separate query? If it is possible with one query/subquery can it be done with multiple unknown ‘cars’?
thanks in advance!
Source: http://www.webdeveloper.com/forum/showthread.php?t=76538