inserting blobs using mysqli
Posted: Wed Mar 14, 2007 6:04 pm
The following code works (testing with blob data < 1MB) but should I have to worry about packet size if the blob data is > 1MB?
Any advice is appreciated.
Code: Select all
if($statement = $this->connection->prepare("INSERT INTO ".TBL_SAVED_QUOTES."(quotename, userid, timestamp, quotedata) VALUES (?, ?, ?, ?)")){
$null = NULL;
$statement->bind_param('siib', $quotename, $userid, time(), $null);
$statement->send_long_data(3, serialize($quotedata));
$savedQuote = $statement->execute();
$statement->close();
}