I would like to create a query to insert several values along with values that come from other tables, for example:
INSERT INTO table
(date, user_id, category_id, title, description)
VALUES
((STR_TO_DATE('04-01-2014', '%b-%d-%Y'),
(SELECT id FROM users WHERE username = 'admin' LIMIT 1),
(SELECT id FROM categories WHERE category = 'games' LIMIT 1),
'title here',
'description here')
This however, gives me an error and from PHP a 500 internal server error. Help please.