It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
What i am looking to do is to be able to create products with an expire date.
When the current date matches the expire date in the database it will change the boolean field on that product. (Boolean is visible/hidden).
This will also send out an email to say that the product has expired.
This needs to happen automatically every day or twice a day.
Any ideas on how to do this?
Use a cron job:
Run a job every (hour|day|whatever) that selects form the product table where expiry_date > current date (you didn't say which db you are using so syntax will vary)
For each result, send an email, set the flag to true and commit the update.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
When I have for example only one record for administrators (only one administrator) with id and password, is it necessary to create a table administrator or not? Why?
There's nothing inherently wrong with a one record table. It's a function of your design. For example, an administrator is not a type of user so you wouldn't stick an administrator in the user's table. But that's a design decision.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to have date and time columns in my database. I chose DATE type for date but to only get time which type should I give and while writing a record for it in which format should I write?
Edit: I am using SQL Server.
Try DateTime, contains both a date and time component.
http://msdn.microsoft.com/en-us/library/ms187819.aspx
EDIT: Now that you say you're using Oracle, it does have time support in the Date value it seems, though I'm not an oracle expert. I found this if it helps:
http://infolab.stanford.edu/~ullman/fcdb/oracle/or-time.html
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I want to implement cache manager,for that I want to clear the cache after 15 days, how to implement this?
How will I get to know 15 days completed or not, How I can achieve this any idea?
The broad strokes: Store your desired cache expiration date, set a timer to go off on that date, and check on startup whether you're past the date. If either the timer goes off or the startup check is positive, clear the cache.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am new to database design, I am trying to build a database of shopping system.
Assume we have a Customer table and a Staff table.
The requirement is:
To allow part of the customers to have privilege of "Item return & refund".
To allow part of the staff to have the authority to process the refund.
My idea is to simply add a column with a Boolean value to "Flag" which customer or which staff has the authority or not?
Is that correct to solve this problem? Any potential problem?
This would be correct for a simplistic design. However, if you want to be able to expand on your website or if your needs grow over time, you may need to allow for more detailed permissions. A user_permissions table and an employee_permission table would be desirable in that case.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
How to show the progressbar while updating 10-30 thousand records in ms access database.
Without more details I can only offer a list of operation to be done:
First you need to know how many modified/inserted record are
present.
Then you should subscribe to the event RowUpdated of your
OleDbDataAdapter.
Set the progressbar initial value to zero and the maximum value to
the count of modified records.
In the RowUpdated event increment by one your progress bar value.
See for reference the OleDbDataAdapter docs on MSDN