MDB getTextDeclaration

From: Date: Fri, 28 May 2004 00:32:53 +0000
Subject: MDB getTextDeclaration
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29762@lists.php.net to get a copy of this message
Hi, I'm a n00b in SQL programming and after doing some research I decided to use MDB for my upcomming projects. I like the idea of the DB schema in xml but I feel like it's a bit limited when it comes to text fields. AFAIK mysql has a limited length of 256 for char and varchar and Oracle has 2000 for the varchar2 type. I don't know about others but I guess they have different limits. The problem is that I've been defining some fields of lengths 300 and 512 but MDB assumes that it must be of type "char" when I use a length. The getTextDeclaration function is defined in common.php and not overloaded by the drivers. Would it be bad if it was defined for every driver? So for example in MySQL if the length is minor to 256 then a varchar can be used, otherwise it's declared as Text. In Oracle from 256 to 2000 gets defined as varchar2 and if bigger as Text. What do you think? ciao, ivan

« previous php.pear.dev (#29762) next »