Gossamer Forum
Home : Products : Others : MySQLMan :

Edit | Delete not always available

Quote Reply
Edit | Delete not always available
Why is it that when I browse or search SOME tables, the Edit or Delete option at the end of a record row are not available.

It seems that the tables with only a few fields have the Edit/Delete available, although I have seen it on longer ones.

In other words, I do a search for a particular record. It finds the desired record, and I would like to delete just that record. But, there is NO delete option available. I am logging in a root from my LinksSQL program. I am using v1.08.


PS. I am able to search and find the record I would like to delete, but without the Delete option, I do not know how to delete it. Is there a way of deleteing a record without the delete column?

Frown

Thanks,

Eddie
http://www-wholesale.com
Quote Reply
Re: [eddie2] Edit | Delete not always available In reply to
Hi,

Edit/Delete is only available on tables that have a primary key defined. If they don't have a primary key, then there is no way to uniquely define a row, so when you hit delete it could end up deleting multiple rows, not the one you selected.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Edit | Delete not always available In reply to
Is there any way of deleting a particular record with the SQL database?

Thanks,

Eddie
http://www-wholesale.com
Quote Reply
Re: [eddie2] Edit | Delete not always available In reply to
Sure...

Go to the SQL Monitor link after you access the table that you want to delete the record(s) from.

Then in the SQL Monitor textbox...you can use the following EXAMPLE SQL statement to delete records:

Quote:

DELETE FROM tblName


If you only want to delete certain records, you could use the WHERE clause function to select certain records to delete.

Like the following:

Quote:

DELETE FROM tblName WHERE (Columname = 'Condition')


The easier method would be to define a PRIMARY KEY for the tables you have in your MySQL database, then the Edit | Delete options would appear.

For more information on running SQL commands/statements via MySQLMan, visit the MySQL web site and search for keywords, like "Delete":

http://www.mysql.com
========================================
Buh Bye!

Cheers,
Me