ID: 30883 Updated by: [EMAIL PROTECTED] Reported By: shhbrk at diku dot dk -Status: Open +Status: Bogus Bug Type: MySQL related Operating System: WIN98 PHP Version: Irrelevant New Comment:
This is not a PHP bug. Please read MySQL Documentation at http://dev.mysql.com/doc/mysql/en/index.html ... in special documentation related to user variables. Previous Comments: ------------------------------------------------------------------------ [2004-11-24 17:09:24] shhbrk at diku dot dk 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 this bug report at http://bugs.php.net/?id=30883&edit=1