Limiting "Presets", Pictures, Messages, etc.

  • Thread starter Thread starter sjsean
  • Start date Start date
S

sjsean

In many sites I have come across a limit to how many pictures,
favorite item of whatever, messages in a website mailbox one can
upload or have for their account. Can someone point me to some
articles on how this is accomplished. It seems wasteful to assign 10
database records when someone signs up assuming they may never use
them.

Suggestions?

Sean
 
sjsean said:
In many sites I have come across a limit to how many pictures,
favorite item of whatever, messages in a website mailbox one can
upload or have for their account. Can someone point me to some
articles on how this is accomplished. It seems wasteful to assign 10
database records when someone signs up assuming they may never use
them.

You could simply check if the limit's been reached when you try you try to
add another item...

sub userAddItem(thing)
if countOfItems(currentUser) < someLimit
addItem(thing)
else
alertUserToProblem()
end if
end sub

or disable the ability to add an item once the limit is reached.

Andrew
 
Back
Top