Jump to content


Photo

Help Figuring Out What A Sertain Strand Does


  • Please log in to reply
2 replies to this topic

#1 cameeob2003

cameeob2003
  • Members
  • PipPipPip
  • Advanced Member
  • 79 posts

Posted 28 June 2006 - 09:40 AM

I was wondering what the:

TYPE=MyISAM AUTO_INCREMENT=26 ;

In something like:

CREATE TABLE `news` (
  `id` int(11) NOT NULL auto_increment,
  `picture` text NOT NULL,
  `content` text NOT NULL,
  `title` text NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=26;

is doing. Im new to SQL so im just trying to get on my feet about it all.


#2 Wildbug

Wildbug
  • Members
  • PipPipPip
  • Advanced Member
  • 1,149 posts

Posted 28 June 2006 - 02:30 PM


That sets the next value of the AUTO_INCREMENT column, typically used in a table dump like that one. So your next value will be 26 in that table. Presumably, there were also 25 lines in the dumpfile, too?
Twice a day my clock works PERFECTLY!  I can't figure out what's wrong with it.

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 03 July 2006 - 02:11 AM

Yeah, most mysqldumps produce that line for no reason whatsoever, since MySQL will handle auto-increments all on its own.  However, this is a great way to start at a non-zero value.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users