Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

editor.cgi : Cannot delete ID field!

Quote Reply
editor.cgi : Cannot delete ID field!
Hello!

I managed to create tables through SQL Monitor but when I delete all the keys from editor.cgi "Delete Fields" it does not allow me to delete the ID field. I could drop that table completely from the MySQL monitor or perl but the editor still shows that the ID field is there as a ghost!!!

Moreover it does not import data in this same name of the table anymore.

Any ideas, anyone had similar problems?

Thanks in advance.

------------------
rajani











Quote Reply
Re: editor.cgi : Cannot delete ID field! In reply to
The ID field is an auto-increment field, and a primary key. You might have to remove the Index before you can delete the field. This is the idea of 'unique' so even if data is deleted, no new data will ever have an ID that has already been used before during the life of the table/index.

I've been able to 'empty' a table from inside phpMYadmin, and clears all the fields in the table.
Quote Reply
Re: editor.cgi : Cannot delete ID field! In reply to
Hello!

Thanks for the reply. The problem is a bit strange.

As you know I am also using phpMyadmin. Now somethings as not OK in phpMyadmin and some not enough in editor.cgi! I made a conclosion.

CASE :

I keep on deleting all the fields by editor.cgi until ID is reached. Then ofcourse it would not be possible to delete it. Go to phpMyAdmin then. And drop the table itself. So it should have deleted the entire table including the remaining ID primary key.

Then Import the table via SQL monitor. A table is created correctly and the listing is also correct. Then import the data.txt with the help of SQL monitor. it is not able to import as the field names are not added to that table correct but remains like a ghost. The active key is still the earlier ID key!!!

With the help of editor.cgi add anathor field. It will create without problems and also show the two new keys. Now at this instance the phpMyadmin shows the newly created table listings.

This means the old and the new table gets created with the database having the same name.

Conclusion for you to check on MySQL Smile:

CREATE TABLE TEST having a primary key only.
ID autoincrement primary key,
index ID

DROP TABLE TEST

CREATE TABLE TEST
ID autoincrement primary key,
Name1 varchar(1) default not null,
Name2 varchar(1) default not null,
Name3 varchar(1) default not null,
Name4 varchar(1) default not null,
index ID

phpMyAdmin will show different than editor.cgi delete field link!!!

The problem seems to be in MySQL and my head rather than in both the scripts Wink

Also Robert,

Did you see the work by Mr. Momoto? I would be interested to find out more about him and his scripts. Seems to be killing, isnt it? I think if Links SQL gets all those powers on spawning of processes it would be the only program on the entire internet capable to generate such things in the category.

Further what Alex term current version as beta is not true. Its not. I havent found a single problem absolutely anywhere. Beta by Alex only means there that in the final versions there may be many new splendid surprises of entirely new routines and new features. I have used many Betas. And Ofcourse, I am having a hard time geting along with Links SQL and its power of development. One feels its necessary and a must but takes time to digest them. PHOOOH!!!


------------------
rajani













[This message has been edited by rajani (edited October 10, 1999).]
Quote Reply
Re: editor.cgi : Cannot delete ID field! In reply to
Ok,

I'm not sure what the problem is, but in MySQL, if you 'drop' a table, it's _GONE_. No way to recover it, no ghosts...

If you want to empty a table, what I would do is go into phpMyAdmin and 'empty' it. (You could drop/create it as well if you'd like.)

Then, you can 'reload' MySQL to make sure that your changes were accepted, and perhaps even reload phpMyAdmin.

Then, go into Links, and ask it to 'resync' the table. That will write out a new .def file that will match the new database.

Things should be in order at that time.

I've been able to 'empty' a table with phpMyAdmin without a problem before, and I've imported and re-imported the database many times.
Quote Reply
Re: editor.cgi : Cannot delete ID field! In reply to
Hello Mr. Pataki!

I am talking of an empty table!

Also after droping a table phpMyAdmin automaticaticylly refreshes and so thats not the problem.

Only chance may be is reloading the server. Lets see.....

------------------
rajani











Quote Reply
Re: editor.cgi : Cannot delete ID field! In reply to
The editor.cgi does not have any built in support for creating/deleting tables. If you use the SQL monitor to create a new table, you shouldn't use editor.cgi to add/remove fields, you should just do that using the SQL monitor (reason being, the editor.cgi tries to maintain the .def file as well).

Cheers,

Alex
Quote Reply
Re: editor.cgi : Cannot delete ID field! In reply to
Hello Alex!

By writing here "SQL Monitor" I mean SQL Monitor of the editor.cgi!!!In the text area of the sql monitor from editor.cgi all this has happened. Thats what is the discussion about.

The subroutines that you have designed are so great that is does everything. There is `command` and $query routine, which I fail to understand why you termed as query,and it is this variable that is actually doing every job I could do via telnet.

I do beleive that you could develop this area so good that it can control so much and make things working especially the areas of import and export <> database.

By the way, I now have more or less a solution for the pops of category_gen_list Smile Smile Smile.


------------------
rajani