[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