Changeset 542038
- Timestamp:
- 05/09/2012 08:17:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
postgresql-for-wordpress/trunk/pg4wp/driver_pgsql.php
r458029 r542038 53 53 function wpsql_fetch_assoc($result) { return pg_fetch_assoc($result); } 54 54 function wpsql_escape_string($s) { return pg_escape_string($s); } 55 function wpsql_real_escape_string($s,$c) { return pg_escape_string($s); } 55 56 function wpsql_get_server_info() { return '5.0.30'; } // Just want to fool wordpress ... 56 57 function wpsql_result($result, $i, $fieldname) … … 274 275 $sql = str_replace( "post_date = '0000-00-00 00:00:00'", "post_date IS NULL", $sql); 275 276 277 // Correct quoting for PostgreSQL 9.1+ compatibility 278 $sql = str_replace( "\\'", "''", $sql); 279 $sql = str_replace( '\"', '"', $sql); 280 276 281 // This will avoid modifications to anything following ' SET ' 277 282 list($sql,$end) = explode( ' SET ', $sql, 2); … … 318 323 if( preg_match('/^.{1}/us',$sql,$ar) != 1) 319 324 $sql = utf8_encode($sql); 325 326 // Correct quoting for PostgreSQL 9.1+ compatibility 327 $sql = str_replace( "\\'", "''", $sql); 328 $sql = str_replace( '\"', '"', $sql); 320 329 321 330 // This will avoid modifications to anything following ' VALUES'
Note: See TracChangeset
for help on using the changeset viewer.