symfony and doctrine: select distinct column

by prettyscripts on 2010-06-16 16:28:27 • 7 comments »

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

symfony and doctrine: keep the deleted record

by prettyscripts on 2010-05-21 10:39:38 • 3 comments »

phpsymfony

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

symfony: doctrine version of autocompleter widget from sfFormExtraPlugin

by prettyscripts on 2010-04-30 11:48:35 • 9 comments »

phpframeworksymfony

though it's not yet formally documented (as this post is written) from sfFormExtraPlugin's readme page, there doctrine version for autocomplete field called sfWidgetFormDoctrineJQueryAutocompleter included with the latest version of the plugin (v 1.1.1).… more »

Tags: autocomplete, doctrine, symfony

symfony and doctrine: default table collation, a better solution

by prettyscripts on 2010-03-08 11:09:13 • 8 comments »

symfony

as of symfony 1.4 and if working with doctrine, there are still problem setting default and correct table encoding and collations with symfony doctrine:build task. i have previously posted 2 solution. the 1st involves hacking the core code, which needs… more »

Tags: collation, database, doctrine, encoding, symfony

symfony: sfDoctrineGuardPlugin and customizing user profile

by prettyscripts on 2010-03-03 11:43:54 • 2 comments »

symfony

sfDoctrineGuardPlugin provides basic authentication. sf_guard_user table only contains minimal fields to make this feature work. all other user relevant information such as name, birthday, contact numbers etc require a new table sf_guard_user_profile tha… more »

Tags: doctrine, profile, symfony, user