kristers_Z Posted July 30, 2013 Report Share Posted July 30, 2013 (edited) Vēlos ievākt statistiku par visām IP adresēm, kas apskata saitu. Saits sastāv no daudzām sadaļām un nepieciešams zināt, kuras sadaļas un cik reižu konkrētā IP adrese apskata. Kā varētu vislabāk uzbūvēt datubāzi šādam mērķim, izvairoties no dublētiem datiem? Un vēl - kādā datu tipā glabāt IP adreses? Edited August 27, 2013 by kristers_Z Quote Link to comment Share on other sites More sharing options...
anonīms Posted July 30, 2013 Report Share Posted July 30, 2013 (edited) `ip_history` (`ip`,`path`,`times_visited`) kas vainas šādai lietai? nočeko vai ip un path jau ir pievientos un tad vnk +1 times_visited. http://php.net/manual/en/function.ip2long.php Edited July 30, 2013 by anonīms Quote Link to comment Share on other sites More sharing options...
F3llony Posted July 30, 2013 Report Share Posted July 30, 2013 (edited) Varchar 40. Bet tev nevajag programmēt. Ej mopšojies kur citur. Edited July 30, 2013 by F3llony Quote Link to comment Share on other sites More sharing options...
daGrevis Posted July 30, 2013 Report Share Posted July 30, 2013 Google Analytics. Quote Link to comment Share on other sites More sharing options...
Kasspars Posted July 30, 2013 Report Share Posted July 30, 2013 Google analītiķis nerāda IP adreses (sasodītais privacy) Quote Link to comment Share on other sites More sharing options...
marrtins Posted July 30, 2013 Report Share Posted July 30, 2013 Varchar 40.INT Quote Link to comment Share on other sites More sharing options...
daGrevis Posted July 30, 2013 Report Share Posted July 30, 2013 http://php.net/manual/en/function.ip2long.php http://php.net/manual/en/function.long2ip.php Quote Link to comment Share on other sites More sharing options...
F3llony Posted July 30, 2013 Report Share Posted July 30, 2013 Jā, jā, protams. A IPV6 ta ko, turpinam mierīgi ignorēt? Quote Link to comment Share on other sites More sharing options...
marrtins Posted July 30, 2013 Report Share Posted July 30, 2013 Bet protams :) Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted July 30, 2013 Report Share Posted July 30, 2013 Ko tur ar VARCHAR ķēpāties - liec uzreiz LONGTEXT :D Quote Link to comment Share on other sites More sharing options...
metal-0-1 Posted July 30, 2013 Report Share Posted July 30, 2013 (edited) `ip_history` (`ip`,`path`,`times_visited`) Tur nesanāk dublēt ip un path pie dažādām ip? ip path times_visited 127.0.0.1 /about 5 127.0.0.1 /info 6 127.0.0.1 /home 7 Edited July 30, 2013 by metal-0-1 Quote Link to comment Share on other sites More sharing options...
daGrevis Posted July 30, 2013 Report Share Posted July 30, 2013 IPV6 ignorējam. Quote Link to comment Share on other sites More sharing options...
anonīms Posted July 30, 2013 Report Share Posted July 30, 2013 nu path protams tiks dublēts pie katras jaunās IP. Ja neder tāds variants, tad visticamāk, ka Tev nekas cits neder kā tavējais, bet būtu stulbi katram path taisīt savu kollonu. Tik pat labi serialized var turēt @db, bet tad filtrācija sux Quote Link to comment Share on other sites More sharing options...
daGrevis Posted July 30, 2013 Report Share Posted July 30, 2013 IP tabula, path tabula un starptabula ar ID uz abām tabulām. Quote Link to comment Share on other sites More sharing options...
Kasspars Posted July 30, 2013 Report Share Posted July 30, 2013 Un IPV6 ignorējam Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.