Help: Need help understanding/fixing this problem...

Discussion in 'PHP' started by Skillman13, Oct 25, 2009.

  1. #1
    I have a box/table with a div id as day, and i have the following code in the box...

    (Its like a calendar btw)...


    $query = ("SELECT * FROM Gamepage WHERE releasetime = '2009-10-29'");
    $result= mysql_query($query);

    while($row = mysql_fetch_array($result))
    {
    echo $row['id'] . ' <a href="'."http://www.play.com". $row['BuyLink'].'" target="_blank">'.'(Buy from Play.com)'.'</a></td>';
    }


    It works well, although, if there are two records, (two records with releasetime of 2009-10-29) it will not work (It works fine and displays it perfectly with only one reccord), but for 2, it simply doesn't work... It displays one record in the box and displays one in a completely different place, outside of the box...

    Please can anyone find the problem/solution,

    Thank you,

    James,

    (Btw an example of this is Mountgame.com/GAMETAB/calendarnovember.php -Assasins Creed does not appear in the '20th' box)
     
    Last edited: Oct 25, 2009
    Skillman13, Oct 25, 2009 IP
  2. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #2
    try changing

    
    echo $row['id'] . ' <a href="'."http://www.play.com". $row['BuyLink'].'" target="_blank">'.'(Buy from Play.com)'.'</a></td>';
    
    Code (markup):
    to

    
    echo $row['id'] . ' <a href="'."http://www.play.com". $row['BuyLink'].'" target="_blank">'.'(Buy from Play.com)'.'</a>';
    
    Code (markup):
     
    mastermunj, Oct 25, 2009 IP
  3. Skillman13

    Skillman13 Peon

    Messages:
    229
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The </td> is needed for html for the box (I think) =/

    Anyone got any other suggestions?
     
    Skillman13, Oct 25, 2009 IP
  4. Skillman13

    Skillman13 Peon

    Messages:
    229
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ok, got it working now... thank you.

    Lol, I always say it doesn't work to you, when it does :p :)

    Thanks so much.
     
    Skillman13, Oct 25, 2009 IP
  5. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #5
    it would be helpful if you can put little more code snippet!

    as far as i have analyzed html after you made my suggested changes, it seems fine.

    Please put 2 entries for 20th oct only and let's see how it shows. then we can identify root cause of problem since at this moment we are not able to see how it shows on page when a date has 2 entries..
     
    mastermunj, Oct 25, 2009 IP
  6. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #6
    you're welcome :)
     
    mastermunj, Oct 25, 2009 IP
  7. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #7
    it still shows a scrollbar without using complete space available inside that day's cell. i guess this problem is because of css. make appropriate changes to utilize complete space and it will look better..
     
    mastermunj, Oct 25, 2009 IP
  8. Skillman13

    Skillman13 Peon

    Messages:
    229
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Ok, i will... thank you,
     
    Skillman13, Oct 25, 2009 IP