Results 1 to 14 of 14
Thread: Help with tables please...
Jan 23, 2012, 04:55 #1
- Join Date
- Mar 2010
- 0 Post(s)
- 0 Thread(s)
Help with tables please...
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
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.
"SELECT photo_caption, photo_description, photo_filename FROM gallery_photos WHERE photo_caption='". $pid."'"
I hope this makes sense.... thank you for any help....