PHP Guys & Dolls I have a sight display issue that I just need to resolve :)

After a select I end up with a record = 9 but I want to display the record as
the name not the value.

The value was inserted as a value so I need to make a join to the original table
in the query, but alas I have tried a few things without any luck.  So it's the
experts whom I need to help out:)

The query is:

$result=mysql_query("SELECT items.ItemSKU, items.ItemName,
items.ItemDescription, items.PostCode, items.Category, items.CityID,
items.CTelephone, items.ItemID, items.Cfax, items.Cemail, items.Caddress,
items.CTown, items.Cwww FROM items WHERE CityID='$CityID' ORDER BY CityID");

while ($row  =  mysql_fetch_row($result)) {

$City=$row['5'];
        }

the display is:

<? echo "$City";

So I need to create a query that then joing the CityID from items to the
CityName in table city.  Or is it the php that needs to be altered?

Andrew


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to