I'm setting up a small e-commerce site using PHP and MySQL and I'm trying to write code that once someone purchases an item, that item is no longer available to other customers. I don't want it removed from the database, I'd rather have a "sold" message appear in place of the "buy now" button or something similar.
Does anyone have an idea how I should go about this, what the function is that I would use?