SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast doubli's Avatar
    Join Date
    Sep 2001
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    This wont work, I dont know why

    This piece of code is used in a few places, only here it wont work ...

    PHP Code:

    // Draws table header information
    draw_smalltable_unlooped(21,"Screenshots"$base_image_url);
        
        
    $result mysql_query($query) or print ("Could not run query");
        
        if (!
    $result)
            {
                echo 
    "Just print something here please";
            }
        else
        {
        while (
    $screenshots mysql_fetch_array($result))
            {
                print(
    "<FONT CLASS=\"small\">");
                print(
    "<A HREF=\"$screenshots[url_large]\">$screenshots[body]</A> ($screenshots[date])<BR>");
                print(
    "</FONT>");
            }
        }
        
    draw_smalltable_unlooped_footer(2,1$base_image_url); 
    One of lifes luxuries ...

  2. #2
    purple monkey dishwasher scoates's Avatar
    Join Date
    Nov 2001
    Location
    Montreal
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you be more specific?
    what does "won't work" mean?
    what's happening?
    what's the error message?

    S

  3. #3
    SitePoint Enthusiast doubli's Avatar
    Join Date
    Sep 2001
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, when it checks for the $result it should print something out ... because the result isnt returning any data.

    However, it's not ... it's leaving the space black

    The if statement must be working, because it works when there is data being returned as it does the while ($section xxxx) statement
    One of lifes luxuries ...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •