Copy link to clipboard
Copied
I have created a posts recordset and a comments recordset
the comments table has a post_id to link the comment to a specific post through setting it equal to the id field in the posts table
so that whenever a post loads the comment whos post_id is equal to the id of the post should load
I know that if one advanced recordset combining the two tables is created I can set the values to be eqal in the where clause but doing so causes an error in the url parameters of the page.
Plz help guys and thanks in advance.
Just do this in advanced recordset
SELECT *
FROM posts JOIN comment
ON posts.post_id = comment.post_id
WHERE posts.post_id = colname
Add 1 variable
name: colname
type: numeric
default value: -1
runtime value: $_GET['pid']
so in browser URL it will be post_view.php?pid=1
Copy link to clipboard
Copied
Just do this in advanced recordset
SELECT *
FROM posts JOIN comment
ON posts.post_id = comment.post_id
WHERE posts.post_id = colname
Add 1 variable
name: colname
type: numeric
default value: -1
runtime value: $_GET['pid']
so in browser URL it will be post_view.php?pid=1
Copy link to clipboard
Copied
Well Thanks for the quick reply but dreamweaver shows an error saying that "comments.post_id does not exist in ON clause"
Copy link to clipboard
Copied
ok it works thanks a lot its just that the row wasn't comments.post_id it was comments.posts_id.
Thanks a lot Dear.
Copy link to clipboard
Copied
Welcome
I'm so glad that you can solve the problem now.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more