Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13

Thread: MySQL query

  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Location
    Stockholm, Sweden
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MySQL query

    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)

  • #2
    Regular Coder
    Join Date
    May 2008
    Location
    Oxford, UK
    Posts
    422
    Thanks
    14
    Thanked 27 Times in 27 Posts
    select distinct(ip) from visits

  • #3
    New to the CF scene
    Join Date
    Mar 2009
    Location
    Stockholm, Sweden
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks it works

  • #4
    New to the CF scene
    Join Date
    Mar 2009
    Location
    Stockholm, Sweden
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    just a nother question, how can i make it into a number, of how many ip:s there are?

    thank you ahead

  • #5
    Regular Coder
    Join Date
    May 2008
    Location
    Oxford, UK
    Posts
    422
    Thanks
    14
    Thanked 27 Times in 27 Posts
    select count(distinct(ip)) from visits

  • #6
    New to the CF scene
    Join Date
    Mar 2009
    Location
    Stockholm, Sweden
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thank you, you solved my problems

  • #7
    Regular Coder
    Join Date
    May 2008
    Location
    Oxford, UK
    Posts
    422
    Thanks
    14
    Thanked 27 Times in 27 Posts
    no problem

  • #8
    New to the CF scene
    Join Date
    Mar 2009
    Location
    Stockholm, Sweden
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you dont happen to know any good free domains?

  • #9
    Regular Coder
    Join Date
    May 2008
    Location
    Oxford, UK
    Posts
    422
    Thanks
    14
    Thanked 27 Times in 27 Posts
    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?

  • #10
    New to the CF scene
    Join Date
    Mar 2009
    Location
    Stockholm, Sweden
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #11
    Regular Coder
    Join Date
    May 2008
    Location
    Oxford, UK
    Posts
    422
    Thanks
    14
    Thanked 27 Times in 27 Posts
    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

  • #12
    New to the CF scene
    Join Date
    Mar 2009
    Location
    Stockholm, Sweden
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #13
    New to the CF scene
    Join Date
    Mar 2009
    Location
    Stockholm, Sweden
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks, I've have a tk domain


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •