SyLon Posted May 12, 2007 Share Posted May 12, 2007 Is that possible? Cause when I'm trying to do that, PHPMyAdmin shows me this error: #1170 - BLOB/TEXT column 'fff' used in key specification without a key length Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/51072-not-a-numeric-key-field/ Share on other sites More sharing options...
techtheatre Posted May 12, 2007 Share Posted May 12, 2007 I do not completely understand what you are asking...please provide more detail... my best guess is that you are starting to create a new table (or set a key in an existing table). If this is the case, i doubt that a primary key can be set on a field of the type "blob"...you will want to use a numeric (int) field for your primary key...any you should probably set it to auto_number so that you don't have to worry about anything. if this is not what you are asking...sorry...please provide more detail. Good luck! Quote Link to comment https://forums.phpfreaks.com/topic/51072-not-a-numeric-key-field/#findComment-251659 Share on other sites More sharing options...
bubblegum.anarchy Posted May 13, 2007 Share Posted May 13, 2007 An index on a blob/text requires a fixed length: ALTER TABLE table_name ADD UNIQUE UNIQUE_COLUMN_NAME (column_name(100)); # The index key is fixed to the length 100 Quote Link to comment https://forums.phpfreaks.com/topic/51072-not-a-numeric-key-field/#findComment-251684 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.