You don't have to have an index in order for an update to work, although indexes do 
help performance a great deal when you are dealing with a lot of records.  Do you have 
"Update" permissions on the particular table/database you are working with?

Brian Drexler

-----Original Message-----
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 3:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL and indexes


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


Reply via email to