1
Good afternoon,
have this query
SELECT
                tblcliente.idCliente,
                tblclienterespostapre.resposta
                FROM
                tblcliente
                INNER JOIN tblclienterespostapre ON tblclienterespostapre.idCliente = tblcliente.idCliente
                INNER JOIN tblpergunta ON tblclienterespostapre.idPergunta = tblpergunta.idPergunta
                WHERE
                tblpergunta.idPergunta = 16 OR
                tblpergunta.idPergunta = 34 OR
                tblpergunta.idPergunta = 35 AND
                tblcliente.estado = 1
that returns this result to me
i needed that instead of returning me 6 rows in two columns I return two rows in 3 columns, this kind:
Linha 1: 42 | andre da silva | 930000000 | [email protected]
linha 2: 43 | cliente numero 2              | telefone  | email |
This is my database template
this is basically an application that manages users, these users are composed by several questions in which the questions can have several characters, as typodequestion, whether it is published or not, whether it was validated or not, these questions are dynamic, or new questions can be added to all customers.
It’s a little confusing :
if it were possible to name the columns it was also an asset
Thank you
As it appears there is already a database modeling error, it is important to have a flag for each type, otherwise it is a mess only.
– Ivan Ferrer
now it makes more sense, because it has id the question and in the answer too..., I will redo the query.
– Ivan Ferrer