Welcome Guest, Not a member yet? Register   Sign In
Database classes for SQL Server 2005 and SQL Server 2008 (using php_sqlsrv.dll from the Microsoft Data Programmability t
#29

[eluser]Bojan Sudarević[/eluser]
[quote author="aj2000" date="1267205812"]When using active record in CI, the database driver looks for the var $_like_escape_str in the sqlsrv driver file above however this is called _escape_char. Need to rename this var in /sqlsrv/sqlsrv_driver.php from

$_escape_char

To

$_like_escape_str

To prevent isset warning errors errors[/quote]

In fact, I think that you should declare both of them, if you want to avoid errors. Currently CI_DB_sqlsrv_driver class declares these $_escape_char and $dbdriver properties, and it doesnt declare: $_like_escape_str, $_like_escape_chr, $_count_string, $_random_keyword. I presume that these properties can be safely copied from CI_DB_mssql_driver class:

Code:
// clause and character used for LIKE escape sequences
    var $_like_escape_str = " ESCAPE '%s' ";
    var $_like_escape_chr = '!';
    
    /**
     * The syntax to count rows is slightly different across different
     * database engines, so this string appears in each driver and is
     * used for the count_all() and count_all_results() functions.
     */
    var $_count_string = "SELECT COUNT(*) AS ";
    var $_random_keyword = ' ASC'; // not currently supported


Messages In This Thread
Database classes for SQL Server 2005 and SQL Server 2008 (using php_sqlsrv.dll from the Microsoft Data Programmability t - by El Forum - 09-22-2010, 03:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB