In the loop, try using print_r($myarray) in the loop to see if the data is
in there at all.

Other than that, switch the while loop to:

while ($myrow = mysql_fetch_assoc($result)) {


That should fix it...


--
Plutarck
Should be working on something...
...but forgot what it was.


""Peter Houchin"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> can any one see a problem with this loop?
>
>   <?
> $db = include"connect.inc";
> $foo = "SELECT * FROM 6pci WHERE card='$card' ORDER BY card";
>
>  $result = mysql_query($foo,$db);
>
>
> while ( ($myrow = mysql_fetch_array($result) ) ) {
>
> $id = $myrow["id"];
> $card = $myrow["card"];
> $serial = $myrow["serial"];
> $avail = $myrow["avail"];
> $pn = $myrow["pn"];
> $cat = $myrow["cat"];
> $box = $myrow["box"];
> $quote = $myrow["quote"];
> }
> ?>
>
> if i call say just $card it only displays the one record (the last one),
the minute i try to call $myrow["card"]; i get nothing at all... any idea's?
>
> I have script identical to this that works perfectly .. only difference is
this one has different names for the values
>
> Peter Houchin
> [EMAIL PROTECTED]
> =========================================================
>      _____                              __   /\
>     /_/_/_\                            /  |_/  \
>    /_/_/_    __  __  __   __          /         \
>    \_/_/_\  /_/ /_/ /_/  /_/          \   _     /
>  ___\_\_\/ /_/_/_/ /_//\/_/            \_/ \/\_/
>  \_//_/_/ /_/_/_/ /_/ \/_/                    v
>      ________   ________________________________________
>     /_/_/_/_/  /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
>    /_/_ _/_/ ______  __   __  /_/ ____      __     ______
>   /_/_/_/_/ /_/_/_/ /_/  /_/ /_/ /_/\_\    /_/    /_/_/_/
>  /_/  \_\  /_/ _/  /_//\/_/ /_/ /_/__\_\  /_/___ _\_\_\
> /_/    \_\/_/_/_/ /_/ \/_/ /_/ /_/    \_\/_/_/_//_/_/_/
> =========================================================
> Telephone : (03) 9329 1455  Facsimile : (03) 9329 6755
> ************* We rent the dot in .COM!  **************
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to