$row returns an array, and you display only the first element....

Jennifer Downey a écrit :

> Hi all,
>
> I had to  re-write this so it would at least show something on the page.
>
> $query = "SELECT id, name, image, quantity FROM {$config["prefix"]}_my_items
> WHERE uid={$session["uid"]} ORDER BY id";
> $ret = mysql_query($query);
> $row = mysql_fetch_array($ret);
> $id = $row['id'];
> $image = $row['image'];
> $name = $row['name'];
> $quantity = $row['quantity'];
>
> $display_block .="<img src=$image><br>$name<BR>$quantity";
> echo "$display_block";
>
> I know there are 2 records in the table but it will only display the first.
> What have I done wrong?
>
> Thanks
> Jennifer
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--
  Marius Ursache (3563 || 3494)

                           \|/ ____ \|/
                           "@'/ ,. \`@"
                           /_| \__/ |_\
                              \__U_/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to