Data type question

Data type question

am 31.03.2006 13:36:07 von Ian Robinson

Hi,

I'm converting a desktop application Delphi/Paradox to a web server
application PHP/MySQL

What data type should I use in MySQL for the following paradox datatypes ?

Boolean ?
Currency ?

TIA
--
Best regards
Ian Robinson

Re: Data type question

am 31.03.2006 16:51:33 von avidfan

Ian Robinson wrote:

> Hi,

> I'm converting a desktop application Delphi/Paradox to a web server
> application PHP/MySQL

> What data type should I use in MySQL for the following paradox datatypes ?

> Boolean ?

see the docs...
http://dev.mysql.com/doc/refman/5.0/en/other-vendor-data-typ es.html

I would use an tinyint (use a check constraint that only allows 0,1)

> Currency ?

not sure... what is the definition of the Currency data type? Number?
Char?

possibly a decimal? example: salary DECIMAL(9,2) (for mega-sports stars?)

> TIA