Limiting "Presets", Pictures, Messages, etc.

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
 
A

Andrew Morton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top