mysql - PHP Script for counting profile views in a social network -


I am new to PHP, but I have read some books and created my own social network. I want to add something which is not new, but still good feature. I want to add profile view.

Suppose a 'ABC' user visits XYZ's profile, then count it and only once should not be incremented every time I do not know how to track the profiles of users watching. any suggestion?

You may have a table with a user's ID2 column. The first column for the visitor user and the second for the visited user, such as:

Table: user_visit

  Visitors visited - - ------- | ---------- | 1 | 2 | 3 | 2 | 3 | 1 |  

If you do this, you can calculate the number of rows to calculate the visit calculation specifically for the user, and you can also record what the key Sees the user


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -