Jump to content

Break In ID Numbers Breaks Echo?!


justlukeyou

Recommended Posts

I have a list which is echo line by line from a database using the ID number as the identifier.  However, the echo has now stopped because I have removed 3 lines.  Instead of skipping from ID13 to ID17 it stops at ID13 so whatever else goes into the database it will not display it.  Can anyone advise why this may have happened?

 

ID 12

ID 13

break

break

break

ID 17

ID 18

ID 19

Link to comment
Share on other sites

This is the code.  Could it be the way my database is set up?

 

It seems to run in a different direct:

 

13

12

17

18

19

 

Instead of:

 

12

13

17

18

19

 


ini_set('display_errors', 1);
error_reporting(-1);

{
$query = "SELECT * FROM homesoeasy LIMIT 0, 5";
}

$result = mysql_query($query);

while($row = mysql_fetch_assoc($result))

{
$notes = $row['notes'];
$question = $row['question'];
$id = $row['id'];

echo "
<div class='questionboxquestion'>
$question
</div>
<div class='questionboxnotes'>
$notes </br>
</div>";
}



// close connection 
mysql_close();

?>
</div>
</div>
</div>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.