1
0
www.mikescher.com/www/protected/components/MsHelper.php

23 lines
491 B
PHP
Raw Normal View History

2014-06-08 15:32:00 +02:00
<?php
class MsHelper {
public static function getStringDBVar($name)
{
$connection = Yii::app()->db;
$command=$connection->createCommand("SELECT SValue FROM {{othervalues}} WHERE Name = '$name'");
$val = $command->queryScalar();
return $val;
}
public static function getIntDBVar($name)
{
$connection = Yii::app()->db;
$command=$connection->createCommand("SELECT [Value] FROM {{othervalues}} WHERE Name = '$name'");
$val = $command->queryScalar();
return $val;
}
}