ID:               32928
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dan at yes dot lt
-Status:           Open
+Status:           Feedback
 Bug Type:         MySQLi related
 Operating System: winxp
 PHP Version:      5.0.4
 Assigned To:      georg
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip




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

[2005-05-05 15:47:53] dan at yes dot lt

this is not NULL or unbuffered resultset only...
try this:

Reproduce code:
---------------
$st = $db->prepare("SELECT 1.23 AS test");
$st->bind_result($x);
$st->fetch();
var_dump($x);

Expected result:
----------------
float(1.23)

Actual result:
--------------
...FATAL ERROR WITH NO OUTPUT...

or maybe floats are also unsupported ?..

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

[2005-05-05 15:41:35] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Prepared statements return unbuffered resultsets by default,
therefore you have to retrieve all data or close the resultset before
any command to the server.

The last statement doesn't work, cause MYSQL_TYPE_NULL is unsupported
(filed as bug #32956).

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

[2005-05-04 09:58:00] [EMAIL PROTECTED]

Looks like repreparing a statement without closing it 
makes some problems -> assigned (tested against 
5.0.5-beta) 
 
The script itself works as expected - fetching a row 
without executing statement before returns an error. 

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

[2005-05-03 16:19:30] dan at yes dot lt

Description:
------------
php dies trying to mysqli_stmt->bind_result(...) with listed queries:

SELECT 1.23 AS test

SELECT NULL AS test

php version 5.0.4, mysql version 5.0.4 beta

Reproduce code:
---------------
$st = $db->prepare("SELECT 1 AS test");
$st->bind_result($x);
$st->fetch();
var_dump($x);

$st = $db->prepare("SELECT 1.23 AS test");
$st->bind_result($x);
$st->fetch();
var_dump($x);

$st = $db->prepare("SELECT NULL AS test");
$st->bind_result($x);
$st->fetch();
echo $st;
var_dump($x);


Expected result:
----------------
int(1)
float(1.23)
NULL


Actual result:
--------------
int(1)
...FATAL ERROR WITH NO OUTPUT...
...FATAL ERROR WITH NO OUTPUT...


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


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

Reply via email to