function db_encode_blob in Drupal 5
Same name in this branch
- 5 includes/database.mysqli.inc \db_encode_blob()
- 5 includes/database.mysql.inc \db_encode_blob()
- 5 includes/database.pgsql.inc \db_encode_blob()
Same name and namespace in other branches
- 4 includes/database.mysqli.inc \db_encode_blob()
- 4 includes/database.mysql.inc \db_encode_blob()
- 4 includes/database.pgsql.inc \db_encode_blob()
- 6 includes/database.mysqli.inc \db_encode_blob()
- 6 includes/database.mysql.inc \db_encode_blob()
- 6 includes/database.pgsql.inc \db_encode_blob()
Returns a properly formatted Binary Large Object value.
Parameters
$data: Data to encode.
Return value
Encoded data.
Related topics
1 call to db_encode_blob()
- _db_query_callback in includes/
database.inc - Helper function for db_query().
File
- includes/
database.mysqli.inc, line 362 - Database interface code for MySQL database servers using the mysqli client libraries. mysqli is included in PHP 5 by default and allows developers to use the advanced features of MySQL 4.1.x, 5.0.x and beyond.
Code
function db_encode_blob($data) {
global $active_db;
return "'" . mysqli_real_escape_string($active_db, $data) . "'";
}