Re: DB_DataObject Generator creates PHP syntax breaking code

From: Date: Thu, 11 Jan 2007 10:51:30 +0000
Subject: Re: DB_DataObject Generator creates PHP syntax breaking code
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26322@lists.php.net to get a copy of this message
On 1/11/07, Simon <simon@tattoomachines.de> wrote:
----- Original Message ----- From: "Justin Patrin" <papercrane@gmail.com> To: "Simon" <simon@tattoomachines.de> Cc: <pear-general@lists.php.net> Sent: Thursday, January 11, 2007 3:31 AM Subject: Re: [PEAR] DB_DataObject Generator creates PHP syntax breaking code On 1/10/07, Simon <simon@tattoomachines.de> wrote:
I'm using a MSSql (I have to) server witch has colum names like "E-Mail"
oder "EG Number".
The Generator creates my DataObject-files with contents like this: ...
    public $Telefax;                         // varchar(25)
    public $E-Mail;                          // varchar(60)
    public $Internet;                        // varchar(60)
    public $EG Number;                  // varchar(30)
... This breaks the PHP syntax of variable names. Because it uses "-" and "
"!
How can I prevent this or working arround, there are only a few "wrong"
variables. Well, I suggest not using those kind of column name sint he first place. but DB_DO should be able to handle this. Are you using the newest version fo DB_DataObject? -- Justin Patrin I'm using DB_DataObject 1.8.5 (newest) and PHP 5.2 on Win XP.
Ok, well look for previous bugs in the bug system about this. If it hasn't been reported before then open a new bug for it. -- Justin Patrin

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