yii: created and updated, who and when

by prettyscripts on 2010-09-02 15:31:02 • Leave a comment »

phpyii

most data have created_date, created_by, updated_date and updated_by columns to audit records. in yii, these columns can be automatically updated via these 2 behaviors:CTimestampBehavior - a standard zii behavior that is distributed with yiiBlameab… more »

Tags: behavior, created, extension, timestamp, updated, yii

yii: using gii outside localhost

by prettyscripts on 2010-07-30 11:37:13 • Leave a comment »

phpframeworkyii

i'm currently reviewing / learning yii, another php framework. while following the guide to configure gii, i wasn't able to access gii. 403 error was displayed. it's because by default gii only allow access via localhost. if you're like me having a sep… more »

Tags: framework, gii, php, yii

symfony and doctrine: select distinct column

by prettyscripts on 2010-06-16 16:28:27 • Leave a comment »

phpsymfonysql

to select distinct column values from a table, there are a few things to note to make sure only distinct rows are returned. in /path/to/lib/model/doctrine/SomeTable.class.php: public function getDistinctValue() { $q = Doctrine_Query()::create()… more »

Tags: distinct, doctrine, select, symfony

upgraded symfony and failed in sfCoreAutoload

by prettyscripts on 2010-05-28 13:59:12 • Leave a comment »

frameworksymfony

one of the development projects was upgraded from symfony V142 to the latest V144. my convention for the development is to symbolic link the symfony core files under lib/vendor directory. after the upgrade, the browser displayed blank page with the fol… more »

Tags: apache, autoload, symfony

symfony: hacking sfDoctrineActAsSignablePlugin to allow updated and created by specific user

by prettyscripts on 2010-05-25 14:36:07 • Leave a comment »

symfony

i'm using sfDoctrineActAsSignablePlugin to audit record creation and updates. ie fields created_by and updated_by are automatically created and updated. this is perfect when running from browsers. but when running as command line such as loading initia… more »

Tags: created, hack, plugin, symfony, updated, user