I have the following code:
$sql = mysql_query("INSERT INTO TB004_PRODUTO_FORNECEDOR ( TB002_CODIGO, TB003_CODIGO )
SELECT TB003_CODIGO, 1 AS Codigo FROM TB003_PRODUTO WHERE TB003_DESCRICAO = '$name_02'
VALUES ( '$name_01', Codigo )");
How can I select the product code inside insert so it just inserts the code?