...

View Full Version : MySQL query



LazyTarget
03-17-2009, 11:29 AM
How do I add a query for phpMyAdmin. So it will show me every different (unique) IP. In one column.


Names:
My database: "statistics"
My table: "visits"

Sub tables:
Name-Type

ID - int(11)
IP - varchar(15)
Page - varchar(50)
Date - date

My mission is to make a html line, with the value of how many different ip:s that has visited my homepage.
(www.gamemasters.tk)

brazenskies
03-17-2009, 11:40 AM
select distinct(ip) from visits

LazyTarget
03-17-2009, 03:35 PM
thanks :thumbsup: it works

LazyTarget
03-17-2009, 03:40 PM
just a nother question, how can i make it into a number, of how many ip:s there are?

thank you ahead

brazenskies
03-17-2009, 03:46 PM
select count(distinct(ip)) from visits

LazyTarget
03-17-2009, 03:47 PM
thank you, you solved my problems :D

brazenskies
03-17-2009, 03:51 PM
no problem :)

LazyTarget
03-17-2009, 04:00 PM
you dont happen to know any good free domains?

brazenskies
03-17-2009, 04:07 PM
what do you mean by free domains? Do you mean hosting?

I don't imagine there's many free hosting sites with mysql.

What language are you programming in?

LazyTarget
03-17-2009, 04:09 PM
in HTML. like www.google.com
the .com but something else.
You have to pay for the .com, .net etc.
But are there any free ones. Untill I've upgraded my page enough.

brazenskies
03-17-2009, 04:16 PM
you used to be able to get a .tk but years since I have had one of them so I don't know if they still do them sorry.

.coms are really cheap now anyway. You can buy one from www.namecheap.com for the equivalent of 7.46 euro

LazyTarget
03-17-2009, 04:16 PM
for example to an index.html file, i have the file online on a server. And I want to make it public so, you can go to it by going to the web

LazyTarget
03-17-2009, 04:17 PM
thanks, I've have a tk domain :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum