How would I do the following (interested only in how to do UNIQUE (title, description)) in myphpadmin?:
CREATE TABLE `myData` (
id serial primary key,
title varchar(255) not null,
description varchar(255) not null,
UNIQUE (title, description)
);
And by the way, so as not to open another question on SO, I would like to know what other types I can use for long strings? Because 225 characters are too small for our purposes. Though I know that varchar can accept up to 65,535 characters as of MySQL 5.0.3. But could I specify those fields as MEDIUMTEXT (my client wants those to be as such for compatibility sake)? When I do so I get an error because "BLOB/TEXT column ... used in key specification without a key length". What should I do then? I need those two fields to be unique - so that I would be able to store similar titles even when descriptions are different, but when there are titles and descriptions that match titles and descriptions of incoming data, I wish not to store this incoming data then.
(I already opened a question on SO at http://stackoverflow.com/questions/2378784/mysql-problem-to-store-only-different-data - but because my cookie was turned off when I asked I can't now get to the question. Otherwise I would ask these questions along with that - and I'd love to thank Atli who answered my privious question. Man, you really helped me!)