Hi Pablo, Thanks for replying. The problem is the images are not coming properly.... go here :http://www.jappz.com/prob.gif and you will see the results i am getting when i should be getting the images according to the red arrows there. Thanks, Ryan On 5/1/2005 1:56:23 AM, Pablo Gosse (gossep@xxxxxxx) wrote: > <snip> > > I have these two tables: > > > > jappz_guestbook(owner_cno, sent_datetime, is_secret, accepted) > > jappz_member_profile(cno, pic_name) > > > > jappz_guestbook's owner_cno and jappz_member_profile's cno are the same > > > > what i need to do is select * from jappz_guestbook where owner_cno=x and > > also select pic_name from jappz_member_profile where cno=jappz_guestbook. > cno > > > > I have been fooling around with something like this: > > > > SELECT * FROM jappz_guestbook > > INNER JOIN jappz_member_profile ON jappz_guestbook.owner_cno = > > jappz_member_profile.cno > > WHERE jappz_guestbook.owner_cno = jappz_member_profile.cno; > > > > but its not working, how do i get the pic name from the other table > > (jappz_member_profile)? > > </snip> > > > > This should do it for you: > > > > select g.owner_cno, g.sent_datetime, g.is_secret, g.accepted, p.pic_name > > from jappz_guestbook g, jappz_member_profile p > > where g.owner_cno = x > > and g.owner_cno = p.cno > > > > HTH, > > > > Pablo -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.0 - Release Date: 4/29/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php