fix SQL query on non-existant column in product table

This commit is contained in:
Colin Kuskie 2006-06-16 22:35:09 +00:00
parent a3a2cffa57
commit 000c35022b
2 changed files with 2 additions and 1 deletions

View file

@ -1,4 +1,5 @@
6.99.5
- fix: Add a Related Product not working
6.99.4

View file

@ -390,7 +390,7 @@ sub www_addRelated {
);
@usedRelated = $self->session->db->buildArray("select relatedAssetId from Product_related where assetId=".$self->session->db->quote($self->getId));
push(@usedRelated,$self->getId);
$related = $self->session->db->buildHashRef("select assetId,title from asset where className='WebGUI::Asset::Wobject::Product' and assetId not in (".$self->session->db->quoteAndJoin(\@usedRelated).")");
$related = $self->session->db->buildHashRef("select asset.assetId,assetData.title from asset left join assetData on assetData.assetId=asset.assetId where asset.className='WebGUI::Asset::Wobject::Product' and asset.assetId not in (".$self->session->db->quoteAndJoin(\@usedRelated).")");
my $i18n = WebGUI::International->new($self->session,'Asset_Product');
$f->selectBox(
-name => "relatedAssetId",