mysql_fetch_array skipping first row

后端 未结 5 1004
旧巷少年郎
旧巷少年郎 2020-11-30 15:25

EDIT : Thanks for the quick responses guys - I ended up switching to mysql_fetch_assoc() and using a do...while and I am good to go.

I am using this

5条回答
  •  死守一世寂寞
    2020-11-30 15:46

    There is extra mysql_fetch_array in the code. Also, opening table tag(

    ) is missing.

    Corrected code:

    $query = "SELECT * FROM members";
    $results = mysql_query($query);
    echo "
    "; while ($row = mysql_fetch_array($results)) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ''; } echo "
    ".$row['Last Name']."".$row['First Name']."".$row['Middle Name']."".$row['Sfx']."".$row['Prf']."".$row['Spouse/SO']."".$row['Ancestor']."".$row['Status']."".$row['Address 1']."".$row['Address 2']."".$row['City']."".$row['ST']."".$row['Zip 5']."".$row['Zip 4']."".$row['Home Phone']."Bio

    ";

提交回复
热议问题