Here's the code:
$conn = new mysqli('localhost', 'user', 'password', 'db');
$stmt = $conn->prepare('select Data from sessions');
$stmt->execute();
$x = 234;
$stmt->bind_result($x);
$stmt->fetch();
var_dump($x);
This outputs:
string '' (length=0)
In fact the table contains exactly one row and the blob column contains some valid ASCII character data (a serialize()
d PHP integer).
Why is this so?
Bump.