Jump to content

mysql_fetch_assoc skips records


mozgras

Recommended Posts

Hi,

I'm new to the thread and I'm having an issue using a while loop and it seems mysql_fetch_assoc skips every 3 records.

$query = "SELECT `id` FROM `ea_contacts` WHERE 1 ORDER BY id";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result)) {
    $id = $row['id']; 
    echo "id=".$id.",";
}

I'm expecting 1,2,3,4... But I'm getting 1,3,6,9....

Any help would be awesome.  Thanks.

Link to comment
https://forums.phpfreaks.com/topic/245162-mysql_fetch_assoc-skips-records/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.