Jump to content

Select if field =/= another field


LemonInflux

Recommended Posts

Hello. I'm doing a project where I have a table like this:

 

ID | IP        | VISITS

------------------

1  | 127.0.0.1 | 2

2  | 127.0.0.1 | 3

 

Basically what happens is when a user views a page, the code looks in another table to see if the page has an ID (if it doesn't, it creates a new row to assign said page an ID). Then in this table, a new row is added containing the page id, the user IP, and the number of times the IP visits that page ID (of course, this will be updated by the script).

 

Now what I want to do is work out how many unique visitors have gone on my site. To do this I'll need to select every row that doesn't contain the same IP as a row selected before. How is this done?

 

Thanks

 

----------------

Now playing: Enter Shikari - Today Won't Go Down In History

via FoxyTunes

Link to comment
https://forums.phpfreaks.com/topic/112367-select-if-field-another-field/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.