php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #36085 Provide example for mysqli_stmt_send_long_data
Submitted: 2006-01-19 14:17 UTC Modified: 2006-01-30 17:15 UTC
From: ate2 at cornell dot edu Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2006-01-19 14:17 UTC] ate2 at cornell dot edu
Description:
------------
It would be much easier to use this method with an example of how it is supposed to be used.  None of the following is explained in present documentation:

How to break data into packets.
Whether to use the mysqli_stmt_execute method before/after this method.
I assume we're not supposed to bind a variable to the placeholder for which we are using this method.  What if that parameter is set initially?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-30 17:15 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

<?php
$stmt = $mysqli->prepare("INSERT INTO messages (message) VALUES (?)");
$stmt->bind_param("b", $null);
$fp = fopen("messages.txt", "r");
while (!feof($fp)) {
	$stmt->send_long_data(0, fread($fp, 8192));
}
fclose($fp);
$stmt->execute();
?>
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 22:01:33 2025 UTC