Skip to content

Instantly share code, notes, and snippets.

View thyseus's full-sized avatar
💭
Linux Rules

Herbert Maschke thyseus

💭
Linux Rules
  • Leipzig, Germany
View GitHub Profile
if($courses) {
$criteria = new CDbCriteria();
$criteria->addCondition(
sprintf(
"course_range_end >= '%s' and course_range_begin <= '%s' ",
$year.'-'.$month.'-01',
$year.'-'.$month.'-31'
));
if($course_area)
$criteria->addCondition(sprintf("course_area_id = %d",
function actionFetchAll($term)
{
$query = sprintf(
"select CityName from geodata
where CityName like '%%%s%%'
group by CityName
order by CityName",
$term);
$result = Yii::app()->db->createCommand($query)->queryAll();
$cities = array();