RE: [PHP] Strange coding bug

2004-01-05 Thread Pat Hanna
riginal Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Monday, January 05, 2004 3:20 PM To: Pat Hanna; php help Subject: RE: [PHP] Strange coding bug [snip] $query="SELECT * FROM products WHERE stock_number = '$item_number'"; $result=mysql_query($query); $row=mys

RE: [PHP] Strange coding bug

2004-01-05 Thread Chris Shiflett
--- Pat Hanna <[EMAIL PROTECTED]> 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

RE: [PHP] Strange coding bug

2004-01-05 Thread Pat Hanna
mailto:[EMAIL PROTECTED] Sent: Monday, January 05, 2004 3:32 PM To: Pat Hanna; Brad Pauly Cc: php help Subject: RE: [PHP] Strange coding bug [snip] 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

RE: [PHP] Strange coding bug

2004-01-05 Thread Jay Blanchard
[snip] 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 no

RE: [PHP] Strange coding bug

2004-01-05 Thread Pat Hanna
a hit. Pat -Original Message- From: Brad Pauly [mailto:[EMAIL PROTECTED] Sent: Monday, January 05, 2004 3:28 PM To: Pat Hanna Cc: 'php help' Subject: Re: [PHP] Strange coding bug On Mon, 2004-01-05 at 12:59, Pat Hanna wrote: > I cannot seem to find the problem in my cod

Re: [PHP] Strange coding bug

2004-01-05 Thread Brad Pauly
On Mon, 2004-01-05 at 12:59, Pat Hanna wrote: > I cannot seem to find the problem in my code. I have two pages. Both > need to select a product from a database. The first page works fine, the > product is found and I use the data in the page. The second one does not > fetch the product. The code is

RE: [PHP] Strange coding bug

2004-01-05 Thread Jay Blanchard
[snip] $query="SELECT * FROM products WHERE stock_number = '$item_number'"; $result=mysql_query($query); $row=mysql_fetch_array($result); When I do 'echo $result;' on the first page, I get the result number. [/snip] If you echo $result; with this code all you should get back is 'array' ($resul