www.webdeveloper.com
Results 1 to 3 of 3

Thread: Missing last record ?

  1. #1
    Join Date
    Jul 2004
    Location
    UK
    Posts
    518

    Missing last record ?

    My list always misses off the last record !

    Is it normal that this coding shows up to the penultimate record
    and does not list the last one ?

    How do i get all of them to list ?

    Many thanks.

    $result = mysql_query($sql)
    or die ("Could not execute MAIN query.");

    while ($row = mysql_fetch_array($result, MYSQL_ASSOC) )
    {
    extract($row);
    require("homes_list.php"); // some code that prints out the details.
    }

  2. #2
    Join Date
    Dec 2002
    Location
    Seattle, WA
    Posts
    1,843
    without the sql statement there is little help anyone can offer

  3. #3
    Join Date
    Jul 2004
    Location
    UK
    Posts
    518
    Thanks - I have got to the root of the problem!

    I am using a LIMIT and had initated it at 0 but
    my script was adding 1 to it before the query so
    the listing started with the second record. My ORDER
    stmt made it look like I was missing the last
    record because my test dat only had 2 rows !

    thanks anyways !

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles