Re: liveuser_admin - storing extra data
| From: | Jeroen Houben | Date: | Thu, 13 Oct 2005 13:08:06 +0000 |
| Subject: | Re: liveuser_admin - storing extra data | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21441@lists.php.net to get a copy of this message | ||
Lukas Smith wrote:
Jeroen Houben wrote:Okay that works, but why would I need an alias array if my fields are called the same? Here's the portion of my conf array 'storage' => array( 'dsn' => LIVEUSER_DSN, 'prefix' => 'lu_', 'alias' => array( 'lastlogin' => 'lastlogin', 'is_active' => 'is_active', 'fname' => 'fname', 'lname' => 'lname', 'org' => 'org' ), 'tables' => array( 'users' => array( 'fields' => array(you seem to be missing the alias array for each of your fields.
'lastlogin' => false, 'is_active' => false, 'fname' => true, 'lname' => true, 'org' => true), ), ), 'fields' => array(
'lastlogin' => 'timestamp', 'is_active' => 'boolean', 'fname' => 'varchar', 'lname' => 'varchar', 'org' => 'varchar'), ), I think it's quite cumbersome like this, I have to specify the fields three times. Perhaps it could be merged to something like: 'tables' => array( 'users' => array( 'fields' => array(
'lastlogin' => array( 'type' => 'timestamp', 'alias' => 'LastLogin','required' => false, ),
'is_active' => array( 'type' => 'boolean', 'alias' => 'IsActive','required' => false, ), ), ), ), where you can leave out "alias" if the key and value are the same. Jeroen