0
I need to take information from another table and add it into another table with more information from a php variable I’ve been doing some research and some shapes I found was:
INSERT INTO tabProdutos ( id, descricao, unidade, qtd, valor) VALUES (‘$id’, ‘
(SELECT cod, descricao, unidade, qtd, valor FROM tabInfoProd WHERE cod = $cod ’);
But nothing happened
What could be wrong? Thank you.
Your query works by testing directly in the database?
– Max Rogério
Yes it is possible but this syntax does not seem correct. that
$id
afterVALUES
is left over in select.– rray