by prettyscripts on 2010-09-02 15:31:02 • Leave a comment »
php • yii
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
by prettyscripts on 2010-07-30 11:37:13 • Leave a comment »
php • framework • yii
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
by prettyscripts on 2010-07-14 12:51:12 • Leave a comment »
smf • sql
important: you must have a backup of the database with deleted topic. if not, you might as well skip this post. instruction here is based on smf v1.1.x and uses phpmyadmin. it's a free browser based mysql administration tool. but if you're a mysql expe…
more »Tags: delete, phpmyadmin, retrieve, smf, topic
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-06-05 02:14:35 • Leave a comment »
php • b2evolution
by default, post author's name is linked to profile page. and by default, b2evolution shows user login on profile page. this raises some security concerns - you don't want the public to know what is your login and you don't want to make it easier for hac…
more »Tags: b2evo, login, profile, user