Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder ajetrumpet's Avatar
    Join Date
    Jul 2009
    Location
    Iowa City, IA
    Posts
    407
    Thanks
    44
    Thanked 5 Times in 5 Posts

    table rows and tables are offset by 1 table

    all,

    i have a log page that looks like this:



    it is a log page of mine, and all of the tables are in line, titles, headers and then the rows. i made a sublog though, that i THOUGHT i wrote just like the other one, just with less code, and it looks like this:



    the first table is not written under the first title, and the last table is written without a title. does anyone have any hints for me without me having to post the PHP code i wrote to get this? it's quite lengthly, and i'm not really sure where the bug is. thanks!

  • #2
    Regular Coder
    Join Date
    Mar 2006
    Posts
    238
    Thanks
    3
    Thanked 37 Times in 37 Posts
    I am afraid completely without code it would be a little bit difficult to say.

    If I was debugging such a code, probably I would try to check what is happening at the first iteration of the loop which produces the output. I would just output all the relevant data and exit the script. Maybe it would allow to see some general bug because of which only the title at the 1st iteration is output ...

    If you could post the code, maybe it would be possible to see the bug without running the code...

  • #3
    Regular Coder ajetrumpet's Avatar
    Join Date
    Jul 2009
    Location
    Iowa City, IA
    Posts
    407
    Thanks
    44
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by SKDevelopment View Post
    I am afraid completely without code it would be a little bit difficult to say.

    If I was debugging such a code, probably I would try to check what is happening at the first iteration of the loop which produces the output. I would just output all the relevant data and exit the script. Maybe it would allow to see some general bug because of which only the title at the 1st iteration is output ...

    If you could post the code, maybe it would be possible to see the bug without running the code...
    i found the bug. i had forgotten to put a closing tag in the each table i was making. doh! after each record in the table, I had this:
    PHP Code:
                                        echo '</tr>';
                                                                        } 
    //CLOSE (26)
                                                              
    //CLOSE (29)
                                        
    echo "<br><br>";
                                        } 
    //CLOSE (28) 
    when I really should have had this:
    PHP Code:
                                        echo '</tr>';
                                                                        } 
    //CLOSE (26)
                                                              
    //CLOSE (29)
                                        
    echo '</table>';
                                        echo 
    "<br><br>";
                                        } 
    //CLOSE (28) 
    i don't even want to think about WHY it was outputting what it was. one echo later, issue solved and output is correct. thanks for the response.
    Last edited by ajetrumpet; 09-06-2009 at 11:23 PM.


  •  

    Posting Permissions

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