-1
I am displaying several fields through a SELECT:
SELECT razaosocial, nomefantasia, cnpj, ie, im, endereco, endereco_numero, endereco_complemento, codCedente FROM cliente WHERE razaosocial LIKE '%carvalho%'
.
So far, so good. But there I also display the codCedente, which comes numeric, I can do a SELECT there inside the codCedente to find the social reason inside a table called CEDENTE? (select razaosocial from cedente Where codCedente = 'codCedente') codCedente.. let’s say it that way?
Yes, I would do it myself. However, this is not the goal! I need to select directly in the field, because I pass these parameters via get, from which fields the system should compose to display.
– Sr. André Baill
if($value=="billing_data"){ $fields .= " , (SELECT razaosocial FROM cedente WHERE idCedente = codCedente) AS codCedente, email_financeiro, vencimento, forma_de_pagamento, nota, fechamento_de, fechamento_a, guias"; } - Fiz dessa forma.
– Sr. André Baill
Already solved your problem with sub-select in the column?
– Jean Gustavo Prates
Yes, I’ve solved it
– Sr. André Baill