If the query works in mysql then it sounds like a problem with your 
php displaying the info I think.  Are you sure you didn't miss 
something small like a variable capitalized wrong or something?

Another reason a query would work in mysql and not on a webpage 
is permissions, but since all the freetrade tables get built at once 
and used as the same user I don't think that is the case here....

On 8 Apr 2001, at 17:07, Joker wrote:

> Here's what I have so far..this is in the item_functions file
> 
>                         $Query = "SELECT ii.Related_Item, r.Name,
> s.Item,s.ListPrice ";
>                         $Query .= "FROM item_item ii, relationship r,
>                         sku s
> ";
>                         $Query .= "WHERE ii.Item = $Item_ID ";
>                         $Query .= "AND ii.Relationship = r.ID and
>                         s.Item =
> ii.Related_Item ";
>                         $DatabaseResult =
>                         mysql_query($Query,$DatabaseLink);
>                         while($DatabaseRow
> =mysql_fetch_object($DatabaseResult)
> )
>                         {
> 
> $Item['Relationship'][($DatabaseRow->Name)][] =
> $DatabaseRow->Related_Item;
>                         }
> 
> if I run the query from mysql it seems to work fine but for some
> reason when I try it on the page itself I cant get it to show the
> price..if I can get the ListPrice to work I can get the SalePrice to
> work.
> 
> > From: "Tom Jakobsen" <[EMAIL PROTECTED]>
> > Reply-To: "FreeTrade" <[EMAIL PROTECTED]>
> > Date: Sun, 8 Apr 2001 22:51:58 +0200
> > To: "FreeTrade" <[EMAIL PROTECTED]>
> > Subject: Re: [FreeTrade] Relationshps and Prices
> > 
> > SELECT ListPrice, SalePrice FROM sku WHERE Item = $RelatedItemID
> > 
> > 
> > if ($SalePrice)
> > {
> > $itemprice=$SalePrice;
> > }
> > else
> > {
> > $itemprice=$Listprice;
> > }
> 
> 
> 
> ------------------------------------------------------------
> To subscribe:    [EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Site:            http://www.working-dogs.com/freetrade/
> Problems?:       [EMAIL PROTECTED]




------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Site:            http://www.working-dogs.com/freetrade/
Problems?:       [EMAIL PROTECTED]

Reply via email to