by prettyscripts on 2010-06-16 16:28:27 • Leave a comment »
php • symfony • sql
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
by prettyscripts on 2010-05-28 13:59:12 • Leave a comment »
framework • symfony
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
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
by prettyscripts on 2010-05-21 10:39:38 • 3 comments »
php • symfony
in most of the projects i work on, when 'deleting' a record, it's preferred to mark it as deleted than actually deleting the record. this makes re-instating a record easier. the common practice is to add a status field to every record.
in doctrine, thi…
more »Tags: database, delete, doctrine, symfony
by prettyscripts on 2010-05-19 15:27:49 • 1 comment »
php • symfony
i want to create a yes / no choice field if a field is null or not. eg, a membership table with suspend_date field. i want to be able to filter list of member who is or not suspended. in filter part of /path/to/application/module/config/generator.yml…
more »Tags: admin, filter, symfony