So the two tables insert is now working so now the display is needed :)

I have this:

// This returns all the companies from items for the selected city and business
type
$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, city WHERE Category='$Category' and
CityID='$CityID' ORDER BY CityID");
if (!$result) echo mysql_error();
else {
    }
while ($row=mysql_fetch_row($result)) {
$IS=$row['0'];
$IN=$row['1'];
$ID=$row['2'];
$CpostC=$row['3'];
$Ca=$row['4'];
$City=$row['5'];
$Ctele=$row['6'];
$II=$row['7'];
$Cf=$row['8'];
$Ce=$row['9'];
$Caddress=$row['10'];
$Ctown=$row['11'];
$Cw=$row['12'];

however the CityID is no longer stored in the items table.  It is in the city
table :)

So I presumably need to do a join?

Any suggestions to get me on the right track?

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