$db->tableInfo(); (PEAR::DB)

From: Date: Thu, 13 Sep 2001 15:39:53 +0000
Subject: $db->tableInfo(); (PEAR::DB)
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1901@lists.php.net to get a copy of this message
Hi, we are currently switching our very own recordSet class to PEAR/DB. In this recordSet class we use a lot of database functions, so we needed to take a deep look into pear/db. I have questions regarding tableinfo() method, it gives back an multi-dim. assoc array with fieldinformations, so far so good. One entry in this array is [flags]. for mysql, this would give back things like "primary_key" or "auto_increment" ... i wonder what other databases give back, i doubt that not all would return "primary_key" but perhaps "pk" instead. If this should be the case, wouldnt it be useful to abstract also this kind of data/flags, because i dont want to make the abstraction in my application of course. right now i do something like: if($hashmap[0][flags]=="primary_key") if a database would return "pk", i would have serious problems, and the whole abstraction would break down. can anyone comment on this? thx (in advance to Thomas Cox :)) -- Marc Logemann (aka Loge, www.marc-logemann.de)

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