Вход Регистрация
Файл: phpbb/db/driver/mssql_base.php
Строк: 50
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/

namespace phpbbdbdriver;

/**
* MSSQL Database Base Abstraction Layer
 */
abstract class mssql_base extends phpbbdbdriverdriver
{
    
/**
    * {@inheritDoc}
    */
    
public function sql_concatenate($expr1$expr2)
    {
        return 
$expr1 ' + ' $expr2;
    }

    
/**
    * {@inheritDoc}
    */
    
function sql_escape($msg)
    {
        return 
str_replace(array("'"""), array("''"''), $msg);
    }

    
/**
    * {@inheritDoc}
    */
    
function sql_lower_text($column_name)
    {
        return 
"LOWER(SUBSTRING($column_name, 1, DATALENGTH($column_name)))";
    }

    
/**
    * Build LIKE expression
    * @access private
    */
    
function _sql_like_expression($expression)
    {
        return 
$expression " ESCAPE '\'";
    }

    
/**
    * Build NOT LIKE expression
    * @access private
    */
    
function _sql_not_like_expression($expression)
    {
        return 
$expression " ESCAPE '\'";
    }

    
/**
    * Build db-specific query data
    * @access private
    */
    
function _sql_custom_build($stage$data)
    {
        return 
$data;
    }
}
Онлайн: 1
Реклама