Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

db_prepare_string() remove special handling for mysql

Since ADOdb's qstr() method calls mysql_real_escape_string() /
mysql_real_escape_string() depending on driver type, it does not make
sense to have special logic within database api to handle mysql
differently from mysqli. Let ADOdb quote the string.
  • Loading branch information...
commit 49d4e76c05cd59222ddf37f5e7e2a3277f16b758 1 parent c13c74b
@dregad dregad authored
Showing with 0 additions and 3 deletions.
  1. +0 −3  core/database_api.php
View
3  core/database_api.php
@@ -698,10 +698,7 @@ function db_prepare_string( $p_string ) {
return utf8_substr( $t_escaped, 1, utf8_strlen( $t_escaped ) - 2 );
break;
case 'mysql':
- return mysql_real_escape_string( $p_string );
case 'mysqli':
- # For some reason mysqli_escape_string( $p_string ) always returns an empty
- # string. This is happening with PHP v5.0.2.
$t_escaped = $g_db->qstr( $p_string, false );
return utf8_substr( $t_escaped, 1, utf8_strlen( $t_escaped ) - 2 );
case 'postgres':
Please sign in to comment.
Something went wrong with that request. Please try again.