Welcome Guest, Not a member yet? Register   Sign In
escape_str in mysql
#3

[eluser]displaynone[/eluser]
In the DB_driver.php, in the function compile_binds, when the char "?" is replaced by the bind, it removes the slashes "\".

I add this into my CI code:
Code:
$sql = preg_replace('#'.preg_quote($this->bind_marker, '#').'#', str_replace('\\', '\\\\',str_replace('$', '\$', $val)), $sql, 1);
line: 525

Is this ok?


Messages In This Thread
escape_str in mysql - by El Forum - 09-24-2007, 08:46 AM
escape_str in mysql - by El Forum - 09-24-2007, 09:33 AM
escape_str in mysql - by El Forum - 09-24-2007, 10:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB