sandis_m Posted March 5, 2011 Report Share Posted March 5, 2011 `users` uid, username `friends` fid, myid, friendid -------------------- #Izvelk draugus. SELECT u.uid,username,lastname f.`friendid`,`myid` FROM `users` u, `friends` f WHERE f.myid='99' AND f.friendid=u.uid GROUP BY f.friendid ORDER BY f.friendid DESC, f.friendid DESC SELECT DISTINCT UNION KO man pielietot? Esmu nedaudz apjucis. Link to comment Share on other sites More sharing options...
e-remit Posted March 5, 2011 Report Share Posted March 5, 2011 JOINo vēlreiz to tabulu klāt: FROM `users` u, `friends` f, `friends` ff Link to comment Share on other sites More sharing options...
marrtins Posted March 5, 2011 Report Share Posted March 5, 2011 Šis pasākums Tev nobruks pie kāda tūkstoša vai pat mazāk. Link to comment Share on other sites More sharing options...
sandis_m Posted March 5, 2011 Author Report Share Posted March 5, 2011 Šis pasākums Tev nobruks pie kāda tūkstoša vai pat mazāk. Ko tad Tu iesaki? Link to comment Share on other sites More sharing options...
black Posted March 5, 2011 Report Share Posted March 5, 2011 (edited) Lieto http://en.wikipedia.org/wiki/Graph_database Ja projekts domāts Latvijai (laisi - līdz 2 miljoniem draugu) tad diezgan vienkārši tādu uzkodēt arī pašam. Palasi arī par http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm - tas ir nākamajam solim, kad vēlēsies atrast, kā šis cilvēks pazīst kādu citu. Visbeidzot, vēlu veiksmi biznesā ar sociālajām applikācijām :) Edited March 5, 2011 by black Link to comment Share on other sites More sharing options...
Recommended Posts