View Single Post
  #2 (permalink)  
Old January 21st, 2005, 12:54 AM
sureshbabu sureshbabu is offline
Friend of Wrox
 
Join Date: Sep 2004
Location: Hyderabad, Andhra Pradesh, India.
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sureshbabu Send a message via Yahoo to sureshbabu
Default

Hi,
 Here you can do this in two ways..
1. You can use you logic in front end in the following way..
   Get the userid into a varaible and compare the user Id of next useri with this variable and if it is same then skip the furthur process like displaying a Photo...

2. If you have only One photo as activated ( i.e isactivated =1 ) Then
 you can use following query..

select Max(Photos.photoid ),photoname,isactivated,username,fname,email from
photos,users where photos.isactivated=1 Group by UserId.


Thanks
Suresh

Reply With Quote