SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    ble
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Selecting from db, and showing only the same stuff on a row.

    Ok, I know how to select from a database, and so I have this

    Code:
    	$showing = mysql_fetch_array(mysql_query("select * from players order by IP"));
    Ok, that pulls out the player's IP adresse, now how would I show if 2, or more, players IPs are the same, it ONLY shows them players that have the same ip - and if a player has a unique IP to the database, it doesnt show this.

    I want it to show ALL the people with the same IP as another player, so not only 1 IP, but like there could be 2 people with the same IP, then another 2, then 3 people, and I want it to show only those people.. getme?

    Thanks to all who help!!
    If someone was helpful, give them some 'rep'.

  2. #2
    masquerading Nick's Avatar
    Join Date
    Jun 2003
    Location
    East Coast
    Posts
    2,215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure this will work, but it's worth a try...

    PHP Code:
    SELECT FROM players WHERE COUNT(ip)>1 GROUP BY ip 
    Nick . all that we see or seem, is but a dream within a dream
    Show someone you care, send them a virtual flower.
    Good deals on men's watches


Bookmarks

Posting Permissions

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