credo che dovresti migliorare la tua query...i database offrono molte potenzialità...
tu che risultato vuoi ottenere? che ti serve sapere dal database?
dal tuo codice si capisce che hai 3 tabelle:
codice:
CREATE TABLE tab1 (
campo1
);
CREATE TABLE tab2 (
campo2
);
CREATE TABLE tab3 (
campo3
);
già qui è un dilemma...xkè usare 3 tabelle uguali? esattamente che ti serve sapere?
xkè potresti usare un JOIN, un NATURAL JOIN...ad esempio:
codice:
SELECT t12.campo2, t3.campo3
FROM tab3 AS t3
JOIN (
SELECT campo2
FROM tab1, tab2
WHERE tab1.campo1 = tab2.campo2
) AS t12
xò servirebbe avere più info sia sulle tabelle che su quello che vorresti fare...