For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > January 2006 > #36085 [Opn->Csd]: Provide example for mysqli_stmt_send_long_data









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #36085 [Opn->Csd]: Provide example for mysqli_stmt_send_long_data
vrana@php.net

2006-01-30, 6:57 pm

ID: 36085
Updated by: vrana@php.net
Reported By: ate2 at cornell dot edu
-Status: Open
+Status: Closed
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:

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();
?>


Previous Comments:
------------------------------------------------------------------------

[2006-01-19 14:17:51] 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?



------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=36085&edit=1
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com