ID:               35793
 Updated by:       [EMAIL PROTECTED]
 Reported By:      deadman_great at mail dot ru
-Status:           Open
+Status:           Feedback
 Bug Type:         PDO related
 Operating System: RH Fedora Core 2
 PHP Version:      5.1.1
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.




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

[2005-12-24 03:15:35] deadman_great at mail dot ru

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 this bug report at http://bugs.php.net/?id=35793&edit=1

Reply via email to