I want to insert value that i get with SELECT to table, but i have no idea how to format it so it's work. When i try the SELECT statement alone, it returns value that i want, but when its nested it returns 0 which it shouldn't. I tried wrapping it in
cat_id = 'number'
insert . . . select. Leave out the
INSERT INTO brand(brand_id, NAME, cat_id) SELECT NULL, 'value', cat_id FROM category WHERE cat_id = 'number';
numberis really a number, then don't use quotes.