From:             shhbrk at diku dot dk
Operating system: WIN98
PHP version:      Irrelevant
PHP Bug Type:     MySQL related
Bug description:  MySQL query bug

Description:
------------
Hello all

I'm expiriencing a bug when trying to perform something like this MySQL
query from PHP:

Select *, @d := x^2
from o
where cos(@d)+sin(@d)>0;

this is a short version of my real query, but shows the deal. (x is a key
in o and the important part is the repeated use of @d, this is what I want
since it is a more complex calculation in "real life".)

When I test it from the prompt in MySQL it works just fine and gives the
results as expected.
But from a PHP script it returns 0 rows...!
I'm certain that something is wrong because when I use a version that
looks like this: WHERE cos(x^2)+sin(x^2)>0
 - that is @d substituted in place - it work just fine.

Can anyone explain this ?

Thanks in advance.



-- 
Edit bug report at http://bugs.php.net/?id=30883&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30883&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=30883&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=30883&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30883&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30883&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30883&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30883&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30883&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30883&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30883&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=30883&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=30883&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30883&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30883&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30883&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30883&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30883&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30883&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30883&r=mysqlcfg

Reply via email to