SkaKri Posted August 8, 2006 Report Share Posted August 8, 2006 (edited) piemēram uzveidojam tabulu 'counter' ar struktūru: id (auto incr)| date | time | url | ip | refferer | is-regist | username 1 |8.8.06 |10.07 |/ |x.x.x.x | |1 |user ok, ar hitiem tiekam galā, zinam kas, ko kur kad darījies. arī varam kārtot pēc datumiem - šodiena, vakardiena, aizvakardiena. bet - kā izvilkt hostus. :/ Edited August 8, 2006 by SkaKri Link to comment Share on other sites More sharing options...
litt Posted August 8, 2006 Report Share Posted August 8, 2006 (edited) Izmanto grupēšanu un subselektus.. Ja MySQL versija neļauj advancētas perversijas, tad selektē noteiktu apgabalu un datus grupē/skaiti php pusē. SELECT COUNT(1), ip FROM counter GROUP BY ip; Edited August 8, 2006 by litt Link to comment Share on other sites More sharing options...
SkaKri Posted August 8, 2006 Author Report Share Posted August 8, 2006 (edited) vari iemest ar saiti manuālī? (nezinu kā rakstīt "group" "select"?) upd: ok šito - http://sunsite.mff.cuni.cz/MIRRORS/ftp.mys...ub-selects.html atradu, bet.... kaut kā patreiz neaizlec. nu palasīšos tālāk. Edited August 8, 2006 by SkaKri Link to comment Share on other sites More sharing options...
hmnc Posted August 8, 2006 Report Share Posted August 8, 2006 tev tak iebaroja GROUP BY... WHERE nepazīsti? viņus abus var lietot kopā... Link to comment Share on other sites More sharing options...
SkaKri Posted August 9, 2006 Author Report Share Posted August 9, 2006 ā, super, skaisti, paldies! :) Link to comment Share on other sites More sharing options...
Recommended Posts