o: "Beauford.2003" <[EMAIL PROTECTED]>
Sent: Tuesday, December 03, 2002 7:41 PM
Subject: Re: Select, mysql_fetch_array, PHP question
> Maybe you have an "if ($line = mysql_fetch_array($result))" line
> somewhere up above? That would cause the while loop to skip
Sorry, where it says echo $item should have read echo $line['item']; Simply
a typo, but the problem is still the same.
Hi,
I'm trying to do a search on database through a web interface using PHP and
having one small problem. Example: If I search for items that cost $5.00 and
there are three of th
On Tue, 3 Dec 2002 08:38:59 -0500, Beauford.2003 wrote:
> while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
> echo $item; }
Try echo $line['item'];
- Steve Yates
- Any sufficiently advanced magic looks like technology.
~ Taglines by Taglinator - www.srtware.com ~
--
$item is probably undefined, unless you are assigning it a value somewhere
else in your script. mysql_fetch_array is putting the result set in an
associative array called $line, so $line['item'] would hold the result from
your query.
-Original Message-
From: Beauford.2003 [mailto:[EMAIL