Pogledajte određenu poruku
Staro 04. 09. 2011.   #2
webarto
expert
Grand Master
 
Avatar webarto
 
Datum učlanjenja: 11.04.2010
Poruke: 998
Hvala: 141
959 "Hvala" u 153 poruka
webarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished roadwebarto is on a distinguished road
Default

PHP kôd:
SELECT t2.id_1t2.id_2SUM(t1.brojbroj
FROM dpt t1
LEFT JOIN dpt t2 ON t1
.id_1 t2.id_2
WHERE t1
.id_2 t2.id_1 
id_1 id_2 broj
1 2 30

E sad jedino još da selektuje ove single parove...
__________________
Github // LinkedIn // PHP // ZCE // Stackoverflow PHP // Site5 Web Hosting
webarto je offline   Odgovorite uz citat
"Hvala" webarto za poruku: