Here is what I am trying to do
What I have created is a simple photoalbum. when you click on a picture it takes you to another page called say freinds_detail.asp. Now depending on what pitcure you click on the url will look like this freinds_detail.asp?pic_id=1
All of the information on the freinds_detail.asp page is coming from a access db in a table called freinds.
here is the table set up
Field Name Data Type
-------------------------
pic_id AutoNumber (primary key)
thum_pic text
large_pic text
pic_title text
pic_descrip Memo
date_taken date/time
But I also have another table called comments.
here is the table set up
Field Name Data Type
-------------------------
comm_id Autonumber(primary key)
pics_id number
by_name text
by_date date/time
comm_text memo
now I want to display the comments for each picture on freinds_detail.asp.
so say for instance I click on the first picture and it takes me to the freinds_detail page the url is going to look like this
freinds_detail.asp?pic_id=1
now i want every record in the comments table to display that has a 1 in the pic_id field.
The one in the pic_id field in the comments table corosponds to the pic_id field in the freinds table.
so freinds_detail.asp?pic_id=1 would be record one in the freinds table.pic_id and I would want all of the recods in the comments.pic_if table to display.
here is a query I tried but it didn't bring the results I wanted...or I am just not clear on how to make it work correctly.
SELECT pic_id, comm_text, pics_id
FROM freinds, comments
WHERE comments.pics_id = freinds.pic_id
Here is a link of the results
[L=Click here][/L]
as you can see in the bottom right it is displaying all of the records where both comments.pics_id and freinds.pic_id.
But I only want it to display for whatever record I am displaying...
Thanks
What I have created is a simple photoalbum. when you click on a picture it takes you to another page called say freinds_detail.asp. Now depending on what pitcure you click on the url will look like this freinds_detail.asp?pic_id=1
All of the information on the freinds_detail.asp page is coming from a access db in a table called freinds.
here is the table set up
Field Name Data Type
-------------------------
pic_id AutoNumber (primary key)
thum_pic text
large_pic text
pic_title text
pic_descrip Memo
date_taken date/time
But I also have another table called comments.
here is the table set up
Field Name Data Type
-------------------------
comm_id Autonumber(primary key)
pics_id number
by_name text
by_date date/time
comm_text memo
now I want to display the comments for each picture on freinds_detail.asp.
so say for instance I click on the first picture and it takes me to the freinds_detail page the url is going to look like this
freinds_detail.asp?pic_id=1
now i want every record in the comments table to display that has a 1 in the pic_id field.
The one in the pic_id field in the comments table corosponds to the pic_id field in the freinds table.
so freinds_detail.asp?pic_id=1 would be record one in the freinds table.pic_id and I would want all of the recods in the comments.pic_if table to display.
here is a query I tried but it didn't bring the results I wanted...or I am just not clear on how to make it work correctly.
SELECT pic_id, comm_text, pics_id
FROM freinds, comments
WHERE comments.pics_id = freinds.pic_id
Here is a link of the results
[L=Click here][/L]
as you can see in the bottom right it is displaying all of the records where both comments.pics_id and freinds.pic_id.
But I only want it to display for whatever record I am displaying...
Thanks