Hi All,
I haven't done much work with MySql especially Manipulating the date and time. I don't have any code yet to put up but i'm trying to do the following:
1. If you register for a course two weeks in advance then you only pay the regular price of the course.
2. If you register between 2weeks and 1day before the course then you pay the price of the course plus a fine.
3. If you register the same day of the course meaning 24hrs or less then you pay the price of the course plus a bigger fine.
4. Also, if a person registers for two courses in the same city they get a discount of %25 of the price of each course.
I don't know if MySql has features that can do this for you or if i'm just gonna have to do it in Perl. If anyone has done something like this before and wouldn't mind sharing their code i would really appreciate it. And if not please direct me to a tutorial that can help me solve these problems.
Thans in Advance,
Kiko
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.