Jump to content

How do i know if the record reach 100?


coder9

Recommended Posts

<?php

for($i=1; $i <= 100; $i) {
     echo $i;
}

while($i<100) {
     // ... stuff
     $i++;
}

?>

 

thanks man.

but how does the code know that it reach 100 record already?

 

where is the mysql command?

 

thank you.

Link to comment
Share on other sites

oh, my stupid brain doesn't figured it out.

 

actually i just want to count the total records (not the column but the row) inside the table.

as simple as that.

 

i don't want to rely on id since this id is not reliable, since it is possible to delete a record and the id number still stay on that number and increment.

there must be another way to do this.

 

thank you.

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.