Thread: efficient
View Single Post
Old Jan 25th, 2008, 7:34 PM   #7
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 763
Rep Power: 3 Jimbo is on a distinguished road
Re: efficient

I think you want 2 tables, one for pictures and one for comments. Assign each picture an ID, and use that ID to tell what comments correspond to what pictures. Then you can do something like 'SELECT * FROM Comments WHERE PictureId = <picId>' to get all the comments for that picture. Is this close?
__________________
<insert disclaimer here>
<insert shameless plug for Visual Studio here>
Jimbo is offline   Reply With Quote