[prev in list] [next in list] [prev in thread] [next in thread]
List: php-gtk-dev
Subject: [PHP-GTK-DEV] [PHP-BUG] Bug #52023 [NEW]: mysqli prepared statements not working with PHP-GTK
From: "james dot bradley at simunix dot com"<php-bugs () lists ! php ! net>
Date: 2010-06-08 12:59:59
Message-ID: bug-52023 () bugs ! php ! net
[Download RAW message or body]
From:
Operating system: Windows Vista
PHP version: Irrelevant
Package: PHP-GTK related
Bug Type: Bug
Bug description:mysqli prepared statements not working with PHP-GTK
Description:
------------
Normal mysqli queries work fine with PHP-GTK but prepared statements never
return any rows from a query. I have tested the same prepared statement
code outside of PHP-GTK in a WAMP installation and there it runs fine,
indicating it is more than likely a bug with mysqli prepared statements and
PHP-GTK. Note that even "SELECT name from saved_data" with no conditions
doesn't work as a prepared statement so the problem is not with bind_param.
Test script:
---------------
// runs fine in PHP-GTK and WAMP
if($result = $mysqli->query("SELECT name FROM saved_data WHERE
data_id<10")) {
while ($row = $result->fetch_object()) echo $row->name;
}
// doesn't work in PHP-GTK (does work in WAMP)
$num = 10;
if($stmt = $mysqli->prepare("SELECT name FROM saved_data WHERE data_id<?"))
{
$stmt->bind_param("i", $num);
$stmt->bind_result($name);
$stmt->execute();
while($stmt->fetch()) {
echo $name;
}
}
Expected result:
----------------
The same output should be generated from both of the above scripts.
Actual result:
--------------
The non-prepared statement outputs the expected rows, the prepared
statement does not.
--
Edit bug report at http://bugs.php.net/bug.php?id=52023&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52023&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52023&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52023&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52023&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52023&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52023&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52023&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52023&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52023&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52023&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52023&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52023&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52023&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52023&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52023&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52023&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52023&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52023&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52023&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52023&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52023&r=mysqlcfg
--
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic