I need an SQL in PHP for MySQL. Please view the table below:
| id | ip | time |
| -------------------------------|
| 1 88.207.189.58 1321301482 |
| 2 76.192.849.84 1321301487 |
| 3 65.253.192.46 1321301492 |
| 4 88.207.189.58 1321301522 |
| 5 12.112.221.22 1321301582 |
| 6 65.253.192.46 1321301633 |
| 7 76.192.849.84 1321301657 |
| 8 76.192.849.84 1321301710 |
| 9 12.112.221.22 1321301819 |
I need to select the ip’s that are NEW after a particular time
Eg: I want to select rows after time=1321301522 but they should be new, they may not appear before that time. In this case the only valid ip would be 12.112.221.22 (row 5).
This wouldn’t work: SELECT ip FROM table_name WHERE time>1321301522 because it would also list the non-new ones. They may not have appeared before that time.
Thanks in advance!!
1 Answer