Jump to content

php/mysql


Scott87

Recommended Posts

Heres the story:

 

We have a website which allows users to upload adverts.

 

 

There is a section which displays 'latest adverts'.

 

This is at random and displays around 30 adverts.

 

However there is one user who has quite a few adverts and thus because of that almost always comes up at the top.

 

Any ideas on how to select all users from the database and limit them to only having 3/4 adverts displaying at any one time.

Link to comment
https://forums.phpfreaks.com/topic/151413-phpmysql/
Share on other sites

You could create a table of users... and each time one of theirs is displayed, update a display count column in that table... then you would be able to check it and say something like if the number of ads displayed for this user is above 'x' number, select a different ad from a different user for display instead.

 

 

Link to comment
https://forums.phpfreaks.com/topic/151413-phpmysql/#findComment-795439
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.