Re: MDB2 - 2 questions

From: Date: Tue, 20 Nov 2007 14:54:06 +0000
Subject: Re: MDB2 - 2 questions
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28187@lists.php.net to get a copy of this message
Mario Gzuk schrieb:
I dont understand why "MDB2_FETCHMODE_ASSOC" dont give me the correct indexes. The column names are all modified to lower case letters. The same is in the Reverse-Class: $data=$db->tableInfo('tablename'); print_r($data); gives me also only the lower case letters of the column names. How can I get the real names???????
MDB2_PORTABILITY_FIX_CASE: http://pear.php.net/manual/en/package.database.mdb2.intro-portability.php
The second question is the missed "table-quoting". For example: you have a table called "xy2007-12-12" and you try to delete it via $db->mgDropTable($tablename); it would fail on mysql (for example). If you escape the tablename with "`" before and behind it will work. The same problem if you use tablenames like "group" or "user".
quote_identifier: http://pear.php.net/manual/en/package.database.mdb2.intro-quote.php Regards, Carsten

« previous php.pear.general (#28187) next »