Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Mysql Command

Quote Reply
Mysql Command
This should be easy but can't think how to do it.

I want to add a unique index to my table but I can't use $editor->add_unique because there are already duplicate entries in the table that I want to be removed. So I need to run this mysql command:

ALTER IGNORE TABLE Tablename ADD UNIQUE INDEX(field1,field2);

Any idea how I can do this through links?
Quote Reply
Re: [afinlr] Mysql Command In reply to
There is a do() command, which you can use to execute custom SQL queries.
Don't remember which module contains it, tough. Search for it.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Mysql Command In reply to
Great - thanks a lot.