Piwik: Unterschied zwischen den Versionen

Aus SchnallIchNet
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „some hints on piwik (1.10.x at the moment)<br/> == Mysql == some tricks to work with the mysql... === location_ip decoding === decode location_ip values in …“)
 
 
Zeile 9: Zeile 9:
 
=== location_ip decoding ===
 
=== location_ip decoding ===
  
decode location_ip values in DB to human readable (dottet-quad) notation.
+
decode location_ip values in DB to human readable (dottet-quad) notation:
  
 
  mysql> SELECT inet_ntoa(conv(hex(location_ip), 16, 10)) AS IP from log_visit;
 
  mysql> SELECT inet_ntoa(conv(hex(location_ip), 16, 10)) AS IP from log_visit;
 +
 +
or to get the visitor_id on top:
 +
 +
mysql> SELECT LOWER(hex(visitor_id)) AS vid, inet_ntoa(conv(hex(location_ip), 16, 10)) AS IP from log_visit;

Aktuelle Version vom 28. Januar 2013, 07:53 Uhr

some hints on piwik (1.10.x at the moment)


Mysql

some tricks to work with the mysql...


location_ip decoding

decode location_ip values in DB to human readable (dottet-quad) notation:

mysql> SELECT inet_ntoa(conv(hex(location_ip), 16, 10)) AS IP from log_visit;

or to get the visitor_id on top:

mysql> SELECT LOWER(hex(visitor_id)) AS vid, inet_ntoa(conv(hex(location_ip), 16, 10)) AS IP from log_visit;