Hi Everyone...I am a complete newbie... I am sure my questions sounds ridiculous ...

But I have a simple MySQL database. Here it is..

Field Type Null Key Default Extra
photo_id bigint(20) unsigned NO PRI NULL auto_increment
photo_filename varchar(25) YES NULL
photo_caption text YES NULL
photo_description text YES NULL
photo_keywords text YES NULL
photo_category bigint(20) unsigned NO 0
gallery_description text YES NULL

1.JPG

Right now the website runs based on photo_id but I would like to base it on the photo_caption. But I am not sure how to establish the connection between photo_id and photo_caption.

I tried

Code:
"SELECT photo_caption, photo_description, photo_filename FROM gallery_photos WHERE photo_caption='". $pid."'"
but there are no instances where these two connects... how can I connect them or rewrite my table?

I hope this makes sense.... thank you for any help....