Jump to content

Recommended Posts

my auto_increment keeps increasing from my old entry after i deleted it. It\'s like 1 then 2 then 3. Then i decide i want to delete 3. After i delete it and i remake it i get it as 4. I read somewhere that you can make it something like hit=hit+1 but im not sure how to do it on my table or page. can someone help me?

Link to comment
https://forums.phpfreaks.com/topic/320-incrementation-help/
Share on other sites

pretty much only I would start matches at 1 instead of 0, makes more sense to the non-programmers who will view the output.

 

I\'m not sure what score.length is but you would want the loop to repeat as many times as you had matches, your going through a loop anyway to echo out your DB results.

 

$matchnum = 1;

while ($myRow = mysql_fetch_array)) {

echo \"Match $matchnum -- $myRow[opponent] $myRow[ourscore] $myRow[thierscore]<BR>\";

$matchnum++;

}

Link to comment
https://forums.phpfreaks.com/topic/320-incrementation-help/#findComment-1052
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.