persix Posted October 13, 2005 Report Share Posted October 13, 2005 Pabraukaju pa forumu, bet nekop ipasi neatradu! Tatad ir tabula ar lauku group_id ar grupas id ierakstu. Tatad ir jauzzin kura grupa ir vismazak izmantota! Piemeram grup_id = 1 atkartojas 3 reizes grup_id = 3 atkartojas 2 reizes, utt. tas nozime, ka grupa numur 3 izmantota mazak jo tabula ierakstita tikai 2 reizes! Ceru ka murgojums ir izsprasts! :) Link to comment Share on other sites More sharing options...
persix Posted October 13, 2005 Author Report Share Posted October 13, 2005 SELECT group_id, count(id) as num FROM `surftipps` group by group_id pats atbildeju uz savu jautajumu :D Link to comment Share on other sites More sharing options...
Delfins Posted October 13, 2005 Report Share Posted October 13, 2005 grup_id = 3 atkartojas 2 reizes, utt. tas nozime, ka grupa numur 3 izmantota mazak jo tabula ierakstita tikai 2 reizes! Nu sarēķini rindiņu skaitu ar count(), vai uzreiz glabā grupu_tabulā laiciņā UsedCnt Link to comment Share on other sites More sharing options...
Klez Posted October 14, 2005 Report Share Posted October 14, 2005 un vispaar nesen tika liidziigs jautaajums risinaats :) taa kaa tur atbildi vareeji atrast :) http://php.lv/f/index.php?showtopic=3168 Link to comment Share on other sites More sharing options...
Recommended Posts