hi,
I am working on job site in which i have to put most rated(clicked) job in one column named populer jobs.
should i use counter for that.
Please suggest any idea.
thanks
hi,
I am working on job site in which i have to put most rated(clicked) job in one column named populer jobs.
should i use counter for that.
Please suggest any idea.
thanks
I do the same thing on my site. Basically I add a column to each row (in your case jobs) called views. I also create another table which is called views, which tracks the views for the last 24hrs, then a cron job runs and wipes the table. This will allow for only 1 pageview per user/ip per day.
my views table is kept simple
views
- id (AUTO INC)
- userid (NULL/INT)
- ip (INT)
- postid (INT)
If you want you can keep the views table populated, but it is NOT recommended as it will fill up FAST...
There's probably more ways to do it, but this way is pretty simple.
BTW... Cron Jobs can be usually set through your control panel (like cPanel).
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.