> -----Original Message-----
> From: Tomasz Korycki [mailto:[EMAIL PROTECTED]
> Sent: 11 August 2003 05:26
> To: [EMAIL PROTECTED]
> Subject: OT: Re: MySQL field data type for ISBN numbers
> 
> 
> At 21:08 2003-08-10, you wrote:
> >On Sun, Aug 10, 2003 at 05:25:05PM -0700, James Johnson wrote:
> > >
> > > I have a MySQL database for books. The ISBN field is set 
> as varchar(15) and
> > > I've put a test ISBN number in of 1-1111-111-11.
> >
> >Note that ISBN numbers are a maximum of 13 characters, not 15.  Ten
> >digits, three dashes.  If you really want to save space, the 
> last digit
> >is just a check digit and can always be determined through a 
> formula on
> >the other digits, so as long as you verify every ISBN before 
> you INSERT
> >it, you can save another digit.
> 
> Hmmm...And how do You come up with an 'X' as the last digit, 
> as many books 
> on the shelves around me do?
> 
I don't know which particular check digit algorithm is used for ISBNs
but the mod-11 algorithm uses the digits 0-9 and X for 10.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to