Re: MySQL and indexes

From: Date: Mon, 18 Mar 2002 20:47:02 +0000
Subject: Re: MySQL and indexes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-89010@lists.php.net to get a copy of this message
I have seen this problem before and, yes, an index field with autoincrement is always a good thing to have. Perhaps, this is not necessary, but usually works. John On Mon, 18 Mar 2002, Jennifer Downey wrote: >-Hi all, >- >-Just wondering, does a table have to have an index? If so what should I >-consider when making a colum an index? >- >-Here is the table I am using but I can't get php to update it. >-Is it because there is no index? >- >- >-CREATE TABLE wt_pet ( >- petid varchar(100) default NULL, >- pet_user int(10) NOT NULL default '0', >- petname varchar(50) NOT NULL default '', >- pet_sex enum('Male','Female') NOT NULL default 'Male', >- pet_equip varchar(50) NOT NULL default '', >- pet_state varchar(20) NOT NULL default '', >- pet_hunger varchar(20) NOT NULL default '', >- pet_date date NOT NULL default '0000-00-00', >- num_pets int(1) NOT NULL default '0', >- ) TYPE=MyISAM; >- >- >-Thanks >-Jennifer Downey >- >- >- >--- >-PHP General Mailing List (http://www.php.net/) >-To unsubscribe, visit: http://www.php.net/unsub.php >- ************************************** John Huggins VANet jhuggins@va.net http://www.va.net/ **************************************

« previous php.general (#89010) next »