Here's a sound approach - drop the
.gif files. Use
.png files instead. PNG files were invented as a free alternative to replace GIF files as the GIF files have proprietary LZW compression algorithm.
Here's one algorithm I can think of -
Step 1 - Get most recent data from DB
Step 2 - Compute MD5 hash of data, or CRC32
Step 3 - Compare it with previous MD5 hash stored, together with timestamp
Step 4 - If hash values differ, new data found
and so on...
Here's a more efficient approach I can think of, if your database supports triggers -
| Step 1 |
Implement database triggers on insert, delete and updates |
| Step 2 |
Update the modified flag in a user defined table, say, DATABASE_STATUS, that has two columns, modified_flag and last_modify_time. |
| Step 3 |
CGI script checks for the MODIFIED_FLAG in the database |
| Step 4 |
Generate new excel & PNG image if necessary by looking at the timestamp and modified_flag. |
| Step 5 |
Clear the modified_flag, and set the last_modify_time. |
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.