From: deadman_great at mail dot ru
Operating system: RH Fedora Core 2
PHP version: 5.1.1
PHP Bug Type: PDO related
Bug description: General error: 2050
Description:
------------
Current script works fine on localhost (winxp), and throw errors on remote
server (rh-fedora).
Software:
Local: winxp-sp2,php-5.1.1,mysql-5.0.3
Remote: fedora-c2,php-5.1.1,mysql-5.0.9
Reproduce code:
---------------
$query = 'SELECT `created`, to_days(from_unixtime(`created`)) as
`day`,count(`id`) as `count` FROM `orders` WHERE `partner`=:partner AND
`created`>=:date GROUP BY `day`';
$vars = array(':partner'=>9,':date'=>1132797644);
$stm = $pdo->Prepare($query);
$result = $stm->Execute($vars);
foreach ($result as $day) // LINE-123
{
...
}
Expected result:
----------------
Rows.
Actual result:
--------------
Warning: main() [function.main]: SQLSTATE[HY000]: General error: 2050 in
... on line 123
--
Edit bug report at http://bugs.php.net/?id=35793&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=35793&r=trysnapshot44
Try a CVS snapshot (PHP 5.1):
http://bugs.php.net/fix.php?id=35793&r=trysnapshot51
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=35793&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35793&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=35793&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35793&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35793&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35793&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35793&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35793&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=35793&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=35793&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35793&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35793&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35793&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35793&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35793&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35793&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35793&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35793&r=mysqlcfg