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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.