Problem query (0T)
| From: | Ryan A | Date: | Sat, 30 Apr 2005 22:08:01 +0000 |
| Subject: | Problem query (0T) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-214275@lists.php.net to get a copy of this message | ||
Hey,
I know this belongs more on the mysql list, but I'm not a member there and I
dont often have problems queries plus dont have time to join then ask just
this one q and then unsub...so if possible please help :-)
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)?
Thanks,
Ryan
--
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