Home » Database » DB_DataObject » Bug #9839
Generator creates PHP syntax breaking code
Details
| Submitted | 2007-01-15 12:26 UTC |
|---|---|
| From | powtac at gmx dot de |
| Assigned | alan_k |
| Status | Closed |
| Package | DB_DataObject |
| PHP Version | 5.2.0 |
| OS | WIN 2000 |
| Roadmaps | (Not assigned) |
Comments
[2007-01-15 12:26 UTC] powtac at gmx dot de
Description:
------------
I'm using a MSSql 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" "!
The regular expression for a variable name is:
^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$