Mysterious problem in my site

Discussion in 'PHP' started by KingCobra, Jun 29, 2009.

  1. #1
    I'm watching a Mysterious problem in my site.

    I made a archive menu in php from my news post that is stored in mySQL
    I made a query thats produce the following result and its ok.

    yearmonth month_total
    ---------- ------------
    2009-02 321
    2009-03 386
    2009-04 303
    2009-05 632
    2009-06 580


    But when I display query result in php it shows following result.
    See, here 'March 2009' is two times. ITS THE PROBLEM.

    March 2009 (321)
    March 2009 (386)
    April 2009 (303)
    May 2009 (632)
    June 2009 (580)


    But in my localhost, when I test it, it result everything ok.
    The actual result will be the following:

    February 2009 (321)
    March 2009 (386)
    April 2009 (303)
    May 2009 (632)
    June 2009 (580)


    Do you know whats happend?
     
    KingCobra, Jun 29, 2009 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    Only the word March appears twice. The counts appear to be the same in both results.

    How are you converting the numeric month to the word March?
     
    Colbyt, Jun 29, 2009 IP
  3. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #3
    Colbyt,

    I used following code to convert the numeric month to the word March

    $postdate = strtotime($archive_row[yearmonth]);
    $archdate = date("F Y", $postdate);

    All of my code workes fine in my localhost.
     
    KingCobra, Jun 29, 2009 IP
  4. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #4
    Nobody can help me ??
     
    KingCobra, Jun 30, 2009 IP