Salve gente.
mi serve un aiuto, allora:
ho queste tabelle:
questionario_risposta,
contiene id della domanda, della risposta.
il questionario a cui appartengono quelle domande/risposte
e che utente ha risposto
codice:create table qo_questionario_risposta ( id_questionario_risposta serial not null, id_questionario integer not null references qo_questionario(id_questionario), id_domanda integer not null references qo_domanda(id_domanda), id_risposta integer not null references qo_risposta(id_risposta), id_utente integer not null references contatto(id_contatto) , primary key ( id_questionario_risposta ));
il testo della domanda
[CODE]
create table qo_testo_domanda (
id_lingua integer references qo_lingua (id_lingua),
testo text,
id_domanda integer references qo_domanda(id_domanda),
primary key (
id_lingua,
id_domanda
));
il testo della risposta
codice:create table qo_testo_risposta ( id_lingua integer references qo_lingua (id_lingua), id_risposta integer references qo_risposta(id_risposta), testo text, primary key ( id_lingua, id_risposta ));
ora dovrei fare una query che mi restituisce
TESTO DOMANDA
- TESTI RISPOSTA DATI (cioè tutte le rispsote a quella domanda)
con input l'id questionario e id utente.
qualcuno sa darmi una mano?
praticamnet è una sorta di report delle risposte.
grazie

Rispondi quotando
