Reputation: 1318
I have a problem. I want to create a table to store images with some additional information, but I always get an error. Usually I try to fix something like this on my own, but I simply don't understand the error message... I took a screenshot with all my settings. All fields hidden are unset except the auto-increment checkbox for ID.
Some translations:
Spalte = Column
Typ = Type
Länge/Werte = Length/Values
Keine(e) = Nothing
Wie definiert = Like defined
@Those who said, I should add the queries: here is a complete screenshot of Safari; there aren't any queries:
Upvotes: 0
Views: 864
Reputation: 13579
You should replace 512
after ENUM
by comma-separated list of ENUM
elements. E. g.
'tag1', 'tag2', 'tag3'
Related: Creating ENUM variable type in MySQL
But I must warn you that ENUM
is intended for a small and very stable set of values. If a value is added, removed or renamed from time to time, it is better to CREATE TABLE tags (id INT NOT NULL AUTO_INCREMENT, name TINYTEXT NOT NULL, PRIMARY KEY (id))
and store just foreign key referencing the tags.id
column to your table. This implements relation of type 1:n. If more than one tag can be assigned, delete the TAGS
column and create a two-column helper table that contains foreign key referencing tags.id
and another foreign key referencing your table’s ID
column. This implements relation of type n:m. You’ll need JOIN
get data from multiple tables.
Upvotes: 0
Reputation: 8007
the problem is that the photofield longblob is set to binary: change its setting from binary to blank
Upvotes: 3