View Full Version : removing query
almightyone
11-01-2002, 11:35 PM
if i have ran a query and need to remove it how would i go about it 1 query being
$DB_site->query("ALTER TABLE forum ADD info smallint(6) DEFAULT '0' NOT NULL");
thnx for help
Erwin
11-02-2002, 12:18 AM
Run this query:
ALTER TABLE forum DROP info;
almightyone
11-02-2002, 12:33 AM
well ive ran this over and over and nothing happened i think my best bet is to say screw this message board as im pissed with it and my host so oh well
almightyone
11-02-2002, 12:40 AM
after running that many times i tried to readd some stuff with this table but it gets error
Database error in vBulletin Control Panel 2.2.8:
Invalid SQL: ALTER TABLE forum ADD info1 smallint(6) DEFAULT '0' NOT NULL
mysql error: Duplicate column name 'info1'
now if i ran what you said above with replacing info with info1 why do i get error?
Erwin
11-02-2002, 12:50 AM
Read the error message:
Invalid SQL: ALTER TABLE forum ADD info1 smallint(6) DEFAULT '0' NOT NULL
mysql error: Duplicate column name 'info1'
You are trying to ADD a column in the forum table called "info1" but it's already there. Of course, you cannot add it again and again.
To remove that column, run this query:
ALTER TABLE forum DROP info1
Run it only once - you cannot drop a column again and again. Same with adding a column. Do it only once. What are you using to run queries?
almightyone
11-02-2002, 12:58 AM
im running them in phpmyadmin i ran the drop and then ran the add and it gave the error it is already there but i ran drop first then ran add and got that error so drop isnt dropping
Erwin
11-02-2002, 01:08 AM
Weird. If you have phpmyadmin, go to the "Forum" table, and just manually DROP the unwanted column. You can visually see it disappear. Then manually add it. That should work for sure.
almightyone
11-02-2002, 01:29 AM
well i drop table but that column is part of it and i cant see it all i can see is the table itself i drop it with drop option but there is a column inside it not shown in phpmyadmin oh well im to pissed with it right now
Erwin
11-02-2002, 01:39 AM
Yikes! Don't drop the table. Drop the column in the table. You need the forum table for your site. Maybe your database is corrupt.
almightyone
11-02-2002, 04:29 AM
na the database isnt corrupt anyways i cant find the columns listed is the problem it wont delete the one and it also wont create another needed oh well
almightyone
11-23-2002, 07:42 PM
i have this poppin up ever since
(mysql error: Unknown column 'notes' in 'field list')
ive tried droping notes but when i run
ALTER TABLE forum DROP notes it says it doesnt exist :confused: could someone help me to fix this please
Erwin
11-23-2002, 09:06 PM
The problem is that the column "notes" is missing but a query exists in the PHP file that you get this error with that is looking for that column - no need to drop it from you db - it's gone. Just edit the PHP file giving you the error to remove the query searching for this column.
almightyone
11-23-2002, 10:06 PM
thnx ill look threw the php files for that
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.