List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:February 22 2012 6:54pm
Subject:Re: MySQL Session Variables with PHP
View as plain text  
----- Original Message -----
> From: "Steven Staples" <sstaples@stripped>

You're asking the wrong question, though. WHY do you want to do that? You should never,
ever ever rely on auto_increment for stuff like record insert order. Did I mention NEVER?

Autoincrements can get reset for a variety of reasons. The only thing you should use them
for, is for having a cheap guaranteed-unique record identifier. No point whatsoever in
trying to compact them, and in larger databases where you depend on them for reference to
other tables, it becomes an absolute nightmare to do so.

Whatever you're up to, there's a better way to do it.

-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel
Thread
MySQL Session Variables with PHPSteven Staples22 Feb
  • Re: MySQL Session Variables with PHPPeter Brawley22 Feb
    • RE: MySQL Session Variables with PHPSteven Staples22 Feb
      • Re: MySQL Session Variables with PHPJohan De Meersman22 Feb