RE: [PHP] Strange coding bug
| From: | Chris Shiflett | Date: | Mon, 05 Jan 2004 20:50:54 +0000 |
| Subject: | RE: [PHP] Strange coding bug | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173783@lists.php.net to get a copy of this message | ||
--- Pat Hanna <phanna@email.unc.edu> wrote:
> I have tried printing out the query and got the exact same thing on
> both pages. The only relevent code is the code I included. The
> $item_number gets passed to both pages exactly the same. The query
> comes up no different on both pages. It is accessing the exact same
> product and yet it will not get a hit.
"One of these things is not like the other. One of these things doesn't
belong."
It sounds like you just need to do some debugging. You have two things.
One works, and one doesn't. Take the one that works (or a copy) and change
one thing at a time until it is identical to the thing that doesn't work.
If you test after each change, you should reveal something.
As far as some things to try...
Are you connecting to MySQL in both scripts? Why don't you output
mysql_error() whenever $result is false and see what it says?
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/