Gossamer Forum
Home : Products : Others : MySQLMan :

Some tables editable, and some are not - why?

Quote Reply
Some tables editable, and some are not - why?
Hi All

In one of my mysql db's, I find that the data in some of the tables are editable, but the data in other tables in the same db are not editable.

I don't have clue why.

Here is a dump of 2 tables (without data). The data in the first one is editable, but the data in the second is not editable.

Is there something that I can add to the second table to make the data editable?

Thanks.

################
# MySQL dump
# Generated by MySQLMan 1.09 (http://gossamer-threads.com/scripts/)
#--------------------------------------------------------

#
# Table structure for table 'archive'
#
DROP TABLE IF EXISTS archive;
CREATE TABLE archive (
ID int(11) DEFAULT '' NOT NULL auto_increment,
issueID int(11) DEFAULT '0' NOT NULL ,
listID varchar(20) DEFAULT '' NOT NULL ,
subject varchar(255) DEFAULT '' NOT NULL ,
date date DEFAULT '0000-00-00' NOT NULL ,
text text DEFAULT '' NOT NULL ,
html text DEFAULT '' NOT NULL ,
sent varchar(10) DEFAULT '' NOT NULL ,
time varchar(20) DEFAULT '' NOT NULL ,
archive int(11) DEFAULT '0' NOT NULL ,
PRIMARY KEY (ID)
);

#
# Table structure for table 'settings'
#
DROP TABLE IF EXISTS settings;
CREATE TABLE settings (
setting varchar(50) ,
value varchar(225)
);

# ----------- Dump ends -----------
####################

------------------------------------------
Quote Reply
Re: [DogTags] Some tables editable, and some are not - why? In reply to
Hi,

Edit/Delete is only available on tables that have a primary key defined, so you can not edit data within the second table.

TheStone.


B.
Quote Reply
Re: [TheStone] Some tables editable, and some are not - why? In reply to
Many thanks, TheStone. I appreciate your help.

Q: would I be able to just make one of the fields the primary key and not have to worry that I might mess up something in the script?

I guess what I'm wondering is whether the program that I'm running could experience problems if I suddenly make the first field the primary key.

Thanks, again.

------------------------------------------
Quote Reply
Re: [DogTags] Some tables editable, and some are not - why? In reply to
DogTags,

What you should do is add a column as the PRIMARY KEY (PRI). I wouldn't make an existing column as the PRIMARY KEY for the sake of making it Primary. The problem with MySQL is that it does not have built-in (at least to my knowledge) referential integrity functionality.

Hope this helps.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Heckler] Some tables editable, and some are not - why? In reply to
Many thanks, Eliot. I'll give it a go. That'll be one more thing off my list.....Cool

I appreciate your help.

------------------------------------------