ID:               37937
 User updated by:  ibexris at gmail dot com
 Reported By:      ibexris at gmail dot com
 Status:           Bogus
 Bug Type:         MySQLi related
 Operating System: linux, fedora core 5
 PHP Version:      5.1.4
 Assigned To:      georg
 New Comment:

Shouldn't php then throw an error at least a warning?  The whole point
of a function like this is to avoid extraneous data assignments.  My
initial desire to use it was like:

prepare
bind
loop
  execute
  loop
    fetch
    [code]
  endloop
endloop
finish

It's trivial to move the bind inside the first loop, but seems
redundant.  Nowhere in the documentation does it say that bind must be
called after execute, and as you see, it *does* work, just doesn't work
correctly.


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

[2006-07-30 11:26:02] [EMAIL PROTECTED]

mysqli_bind_result has to be called after mysqli_stmt_execute, not
before.

        $stmt = $mysql->prepare("SELECT CONCAT('xxx', ?, 'xxx') FROM DUAL");
        $stmt->bind_param('s', $a);
        $a = "abc";

        $stmt->execute();
        $stmt->bind_result($concat);

        $stmt->fetch();
        var_dump($concat);

Result:
string(9) "xxxabcxxx"


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

[2006-06-27 21:08:43] ibexris at gmail dot com

Not sure what else it could be.  The mysql logs clearly show the
correct queries going in, and when you run them in the client, they
produce correct results.  It *only* happens with bound parameters,
crosses several versions of php and mysql (forgot to mention that I
started with 5.0.14), and is present on at least two different systems
(fc4 + official mysql packages, and fc5 with distro-supplied packages).
 The fact that part of my browser useragent came back in one of the
results makes it pretty clear that php is at least somehow involved.

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

[2006-06-27 21:03:32] [EMAIL PROTECTED]

Doesn't look like PHP problem to me, but I'm assigning it to the
maintainer.

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

[2006-06-27 20:58:45] ibexris at gmail dot com

5.0.22.  Also, my main machine is running php 5.0.4, but I replicated
it on another machine with 5.1.4 before submitting the bug (same
version of mysql).

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

[2006-06-27 20:56:20] [EMAIL PROTECTED]

Please also tell the version of MySQL you're using.

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/37937

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

Reply via email to