Creative, Informative and Entertaining Stuff for everyone

Wednesday May 23rd 2012

Categories

Archives

Calender

May 2012
S M T W T F S
« Mar    
 12345
6789101112
13141516171819
20212223242526
2728293031  

‘MVC’ Archives

configure database using propel

$ ./symfony configure:database --name=propel --class=sfPropelDatabase "mysql:host=localhost;dbname=dbname" username userpassword

Self join criteria in symfony

For Example : SELECT tbl1.id FROM tbl1 a LEFT JOIN tbl1 b ON a.somecolumnname = b.somecolumn ORDER BY a.somecolumn DESC The criteria would be as follow $c=new Criteria(); $c->addAlias('a', 'tbl1'); $c->addAlias('b', [...]

select multiple column from multiple table in cakePHP

$markers = $this->Post->find('all', array( 'joins' => array( array( 'table' => 'cp_user', 'alias' => 'users', 'type' => 'left', 'foreignKey' => false, 'conditions'=> array('Post.postauthor = users.id') ) ), [...]