close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Related Product not appearing.

Thread began 4/26/2015 10:12 am by Kumel | Last modified 4/27/2015 8:11 pm by Ray Borduin | 752 views | 7 replies |

Kumel

Related Product not appearing.

this website is for displaying artworks.
Every artwork got an artist_id

So lets say i m viewing at a artwork (artworks-details.php) of artist_id = 2

So then i got a section where i wanna show other artworks of same artist ie artist_id=2

I created this RS:
SELECT *
FROM artworks
WHERE artist_id = colname

colname: int -1 $row_WADAartworks['artist_id']
WADAartworks is RS of artwork.

Now other artworks are not displaying. not sure where i have gone wrong.
Page attached.

Sign in to reply to this post

Ray BorduinWebAssist

You have two issues.... first you can't filter one recordset with a value from another directly using the default Dreamweaver recordset. Second your recordset's are in the wrong order.

First you need to move the recordsets to appear in the correct order. Copy lines 39-65 and paste them below the other recordsets maybe at the bottom just above the <!doctype> tag.

Then you will have to store a temporary variable above it. Add something like:

<?php
$_GET['artist_id'] = $row_WADAartworks['artist_id'];
?>

Then you can update the bottom recordset to filter it with the $_GET variable instead of the recordset value.

Sign in to reply to this post

Kumel

thats nice. (y) seems to work fine now. well for now lets say i m viewing id=100
& id=100 is the last artwork
and on related artworks order is DESC ID
So if i m viewing id=100, in related artworks again 100 is shown which isnt relevant.

So how to solve this problem?

Sign in to reply to this post

Kumel

i m receiving an error as :
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /Applications/XAMPP/xamppfiles/htdocs/shrishtiart/artwork-details.php on line 152

file attached.

Sign in to reply to this post

Kumel

no more errors. something was wrong with it. well how can we do the above thing as discussed earlier?

About not displaying same artwork in related artwork section

Sign in to reply to this post

Ray BorduinWebAssist

If you update line 152 of the file you sent earlier to:

$query_RelatedArtworks = "SELECT * FROM artworks WHERE artist_id = ".$row_WADAartworks['artist_id']." ORDER BY id DESC";

I think it would work.

Sign in to reply to this post

Kumel

it works. thnks

what about not displaying same artwork when its been viewed?

Sign in to reply to this post

Ray BorduinWebAssist

You could store an array of viewed artwork in the SESSION and then filter out that array from your recordset. This is something we could help with in a premier support ticket.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...