1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

For over a week I thought my sales were falling like a rock, but it was just...

Discussion in 'General Chat' started by aab1, Sep 17, 2011.

  1. #1
    A few months ago I programmed my website to draw graphs of my sales for the last month, year and last 5 years. Last week I noticed the graphs falling like a rock day after day until today it reached a point where it just didn't add up as I was getting paid more than the graphs indicated.

    I realized 2 bugs caused by changes I made last week causing many sales to no longer be counted:

    First I set it so that each sale record has a date and time, before it had only date so sales would not sort in the exact order they occurred in during the day, but when calculating sales I use "SaleDate < Date", but since the sale is now recorded as Sept 17th 4:41 PM, this is larger than just "Sept 17th" so today's sales were never counted (it now compares date and time to date and time to resolve this issue).

    I also changed the titles of some items, but forgot to update the sales graphs for those items to calculate the items with the new titles so none of those were counted.

    This is why the graphs were incorrectly falling like a rock, feels good that those graphs were not reflecting reality!

    After correcting these 2 bugs, the graphs have actually been going up these last days.
     
    aab1, Sep 17, 2011 IP
  2. The Webby

    The Webby Peon

    Messages:
    1,852
    Likes Received:
    30
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Hah, those little coding bugs can be really nasty..
    They give so much headache..

    Congrats on fixing them..
     
    The Webby, Sep 18, 2011 IP