Get me outta here!

BLOG @ Erman Gülhan

Clean Code Driven Software Developer

Menu

Skip to content
  • Home
  • Contact

Monthly Archives: October 2015

How to use alias table name with CDbCriteria using Yii Framework

October 26, 2015 by admin
public function getUserOpts($op=null)
{
	$ret=User::model()
		->active()
		->with(array('userTypeVal.userType' => array('alias' => 'ut')));

	if(empty($op))
	{
		return $ret->findAll('ut.name="company-official"');
	}
	else
	{
		return $ret->find('ut.name="company-official" and t.id=:uid',array(':uid'=>$op));
	}
}
Php Yii Framework aliascdbcriteriawith Leave a comment

How to set timezone to Europe/Istanbul on Linux servers

October 18, 2015 by admin

On deabian systems, we can use the following command to do this:

dpkg-reconfigure tzdata

You should select “Europe” from first menu and “Istanbul” from second menu. Example output:

Current default time zone: 'Europe/Istanbul'
Local time is now:      Sun Oct 18 14:14:34 EEST 2015.
Linux dpkg-reconfiguretimezonetzdata Leave a comment

How to calculate one day ago date time using MySQL

October 1, 2015 by admin

We should use the following statement to calculate one day ago date time using MySQL:

SELECT NOW() - INTERVAL 1 DAY;
mysql SQL Leave a comment

Post navigation

Recent Posts

  • How to Restart Supervisor Workers
  • How to Set Raw, html text for checkbox – radio labels when used symfony form builder
  • Wamp Server Yüklerken Eksik VCRUNTIME140.dll ve MSVCR110.dll Dosyaları Hatası
  • How to use alias table name with CDbCriteria using Yii Framework
  • How to set timezone to Europe/Istanbul on Linux servers

Recent Comments

    Archives

    • August 2019
    • May 2019
    • May 2017
    • October 2015
    • September 2015
    • July 2015
    • April 2015
    • March 2015
    • February 2015
    • December 2014
    • November 2014
    • October 2014
    • September 2014
    • August 2014
    • July 2014
    • June 2014
    • May 2014
    • April 2014
    • March 2014
    • February 2014
    • January 2014
    • December 2013
    • November 2013
    • October 2013
    • September 2013
    • August 2013
    • July 2013
    • June 2013
    • May 2013
    • February 2013
    • January 2013
    • December 2012
    • November 2012
    • April 2012
    • March 2012
    • January 2012

    Categories

    • android
    • Apache
    • CodeIgniter
    • Common
    • debian
    • Elasticsearch
    • git
    • Html
    • Javascript
    • JQuery
    • Linux
    • mysql
    • Php
    • Postgresql
    • Regex
    • Shell
    • SQL
    • Svn
    • symfony
    • twig
    • Uncategorized
    • Vim
    • Yii Framework

    Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
    Proudly powered by WordPress | Theme: Something Fishy by Caroline Moore.