asdadsa
asdadsa

Reputation: 19

PHP mysqli updating a blob value in table does nothing

I have a variable called $description that has a paragraph of information in it. Some of these descriptions are a sentence or 2, some are long, so im using blobs to save this instead of var char. This statement executes without a problem, but nothing actually gets saved. No errors reported.

$query = "UPDATE event SET description=? WHERE id=? LIMIT 1";
if($stmt = $db -> prepare($query))
{
    $null = NULL;
    $stmt -> bind_param("bi", $null, $id);
    $stmt -> send_long_data(0, $description);
    $stmt -> execute();
}

Is there something im missing?

Upvotes: 1

Views: 1422

Answers (1)

Juraj Blahunka
Juraj Blahunka

Reputation: 18533

Instead of binding b as blob, try to refer to s as string

Upvotes: 2

Related Questions