Category Archives: php

Easier Search||Filtering With Controller::postConditions()

Using postCondition to simplify your search or filtering feature.

Second Day On Building Drupal Module

Me on drupal module development

Post-Lamp2Win

I lost at lamp2win and proud of it.

Launching the Prayers For Forgiveness Blogger Widget!

You can get it here.
Blessed with this idea after Ramadhan but hope everybody, and myself, find it especially useful for the next Ramadhan.
This blogger widget randomly displays one prayer (english translation) from the seventy prayers written down by Hasan Al-Basri, a respected scholar born in 21 AH and brought up in the house of [...]

menggunakan cakephp’s beforeFind

I found out that on cakephp 1.2 RC3 you must use the new $Model->find() style or the query will break.

1
2
3
4
5
6
7
8
9
10
11
//in the controller use this…
$this->Post->find(’first’, $params);
 
//instead of the ‘old’ style…
$this->Post->find($conditions);
 
//so that in the model, you can do something like this…
function beforeFind($queryData) {
$queryData[’conditions’]["`Post`.`post_type`"] = "personal";
[...]

Contoh penggunaan find dalam cakephp 1.2

contoh menggunakan find mengikut cakephp 1.2

RSS for Posts RSS for Comments