public static function getRecordByWhere($conditions, $options = [])
    {
        if (!is_array($conditions)) {
            $conditions = [$conditions];
        }

        $options = Util::prepareOptions($options, [
            'order' => false,
        ]);

        // initialize conditions and order
        $conditions = static::_mapConditions($conditions);
        $order = $options['order'] ? static::_mapFieldOrder($options['order']) : [];

        return DB::oneRecord(
            'SELECT * FROM `%s` WHERE (%s) %s LIMIT 1',

            [
                static::$tableName,
                join(') AND (', $conditions),
                $order ? 'ORDER BY '.join(',', $order) : '',
            ],

            [static::class,'handleError']
        );
    }