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
--- 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
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
[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
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
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
[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
7 matches
Mail list logo