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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Dec 2010
    Location
    London
    Posts
    338
    Thanks
    63
    Thanked 11 Times in 11 Posts

    first result is blank

    Hi.

    When displaying results from a 'do, while' loop, the first result displayed is always empty. For example I am displaying results from a database in individual html tables... the table is still 'echoed' but the values are blank. This is always only for the first result, the rest are all fine. I seem to remember this happening to me before and it was because I had two sql_fetch references.. which I now have again. Is there anyway to stop the first empty result being displayed?

    I would show some code but it's really long and i think this is something quite simple.

    Cheers, any advice would be great.
    Last edited by paddyfields; 10-24-2011 at 08:02 PM.

  • #2
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,633
    Thanks
    4
    Thanked 148 Times in 139 Posts
    would you like us to guess or would you kindly provide your code? the problem will be your code, not the query.

    Don't provide your WHOLE script, just your query and the code you use to print out the results.

  • #3
    Regular Coder
    Join Date
    Dec 2010
    Location
    London
    Posts
    338
    Thanks
    63
    Thanked 11 Times in 11 Posts
    Yeah sorry, that is ridiculously vague. I'll copy in some code when I get home.

  • #4
    Regular Coder
    Join Date
    Dec 2010
    Location
    London
    Posts
    338
    Thanks
    63
    Thanked 11 Times in 11 Posts
    Fixed it.. simple typo.


  •  

    Posting Permissions

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