-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, all --

Having learned a bit about indexes, I have tried to practice a bit.  So
far things work for my char(20) fields, but I have a problem with a
tinyblob.  To wit:

  create table ccards
  (
    # ID number
    id smallint not null default 0 auto_increment primary key ,
    type smallint not null ,    # references ccardtypes.id
    name char(40) not null ,    # name as on card
    number tinytext not null ,  # card number
    expdate date not null ,     # expiration date
    hashsum tinyblob not null , # hash of the card: have we seen this one?
    index (hashsum)             # for quick lookups
  ) ;

Whenever I try this with the index, I get

  ERROR 1170 at line 49: BLOB column 'hash' used in key specification
  without a key length

I don't know where the key length needs to be specified; I tried

  hashsum tinyblob(255) not null

but that puked at the create stage :-)


TIA & HAND & Happy Holidays

mysql query,
:-D
- -- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE+EMBEGb7uCXufRwARAr/eAJ0ffNkpN6ifCuuFehZnBKqkkR/BWACfcsAz
q7a513vlz5dO7r43GsrTwKI=
=KPvm
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to