PDA

View Full Version : How to delete a sql entry


superman
06-06-2003, 11:46 PM
Well, the main problem is, it didn't creat tables, just modified original ones, here is the sql entry, can someone give me an sql entry to delete the entry?.
Heres the entry below. forum being the name of your forum db

ALTER TABLE `forum`.`user` ADD `hp` INT(6) DEFAULT '0' NOT NULL, ADD `maxhp` INT(6) DEFAULT '0' NOT NULL, ADD `ma` INT(6) DEFAULT '0' NOT NULL, ADD `maxma` INT(6) DEFAULT '0' NOT NULL, ADD `pp` INT(6) DEFAULT '0' NOT NULL, ADD `maxpp` INT(6) DEFAULT '0' NOT NULL, ADD `ap` INT(6) DEFAULT '0' NOT NULL, ADD `element` INT(3) DEFAULT '0' NOT NULL;

filburt1
06-07-2003, 12:16 AM
ALTER TABLE forum DROP hp;
ALTER TABLE user DROP hp;

edit: ...repeat the pattern...because the query's one line it's half impossible to read :rolleyes:

superman
06-07-2003, 03:23 AM
ahh here we go, can you do it now? I have no clue about ANYTHING in sql, so can you like.. redo it so I can just copy and paste what you write? THANKS in advance. The hack I trid to implement wasn't worth it.


ALTER TABLE `forum`.`user` ADD `hp` INT(6) DEFAULT '0' NOT NULL, ADD `maxhp` INT(6) DEFAULT '0' NOT NULL, ADD `ma` INT(6) DEFAULT '0' NOT NULL, ADD `maxma` INT(6) DEFAULT '0' NOT NULL, ADD `pp` INT(6) DEFAULT '0' NOT NULL, ADD `maxpp` INT(6) DEFAULT '0' NOT NULL, ADD `ap` INT(6) DEFAULT '0' NOT NULL, ADD `element` INT(3) DEFAULT '0' NOT NULL;

Xenon
06-07-2003, 08:39 AM
ALTER TABLE forum.user DROP hp

superman
06-07-2003, 05:23 PM
well I took your guys advice, and tried writing an sql query with what you gave me, this is what I came up with, I didn't know if you shoudl put the ``` things in so I did, please let me know if this would work or not.

ALTER TABLE `forum`.`user DROP `hp` INT(6) DEFAULT '0' NOT NULL, DROP `maxhp` INT(6) DEFAULT '0' NOT NULL, ADD `ma` INT(6) DEFAULT '0' NOT NULL, DROP `ma` INT(6) DEFAULT '0' NOT NULL, DROP `maxma` INT(6) DEFAULT '0' NOT NULL, DROP `pp` INT(6) DEFAULT '0' NOT NULL, DROP `maxpp` INT(6) DEFAULT '0' NOT NULL, DROP `ap` INT(6) DEFAULT '0' NOT NULL, DROP `element` INT(3) DEFAULT '0' NOT NULL;

EDIT: this didn't work :( can someone give me a clear thing of what to do?

Xenon
06-07-2003, 09:46 PM
i told ya the exact query, nothing has to be added

repeat this queriy for every added field like maxhp....

superman
06-07-2003, 09:47 PM
oh! lol thanks

superman
06-07-2003, 10:58 PM
Thanks a bunch, worked fine, and got rid of all of em.

thanks again

Xenon
06-08-2003, 09:25 AM
you're welcome