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’);…
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’);…
Hacktivist group Anonymous, which has been responsible for cyber-attacks on the Pentagon, News Corp, and others, has vowed to destroy Facebook on November 5th (which should ring a bell). Citing…
Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(+)$ $1.php
Options +FollowSymLinks RewriteEngine on RewriteCond %{filename.php} !-d RewriteRule ^(+)$ $1.php
1. Who is Anna Hazare? An ex-army man. Fought 1965 Indo-Pak War 2. What’s so special about him? He built a village Ralegaon Siddhi in Ahamad Nagar district, Maharashtra 3.…
SQLSTATE: Syntax error or access violation: 106 you have an error in your SQL syntax; check the manual that corresponds to you server version for the right syntax to use…
LONDON (Reuters Life!) – A specialist ice cream parlour plans to serve up breast milk ice cream and says people should think of it as an organic, free-range treat. The…
Suppose you want to include/require any file in your scripts, But before doing so you want to confirm that the included or required file doesn’t contain error. Then in that…
$requestedUrl = “http://www.example.com/abc.php”; $tags = get_headers($requestedUrl); if(preg_match(“/Not Found/i”,$tags) || preg_match(“/Service Unavailable/i”,$tags)) { echo “Requested Url does not exists”; } else { echo “Requested Url exists”; }
$markers = $this->Post->find(‘all’, array( ‘joins’ => array( array( ‘table’ => ‘cp_user’, ‘alias’ => ‘users’, ‘type’ => ‘left’, ‘foreignKey’ => false, ‘conditions’=> array(‘Post.postauthor = users.id’) ) ), ‘conditions’=>’Post.poststatus = 1’, ‘fields’=>array(‘Post.postid’,…