Hello,

I have 2 tables(pics and outings)

pics
pic_id, tinyint
path, varchar

outings
outings_id, tinyint
pic1_id, tinyint
pic2_id, tinyint
pic3_id, tinyint
pic4_id, tinyint

When i try to do a join like this

mysql_query("SELECT * FROM pics inner join outings on
outings.pic1_id=pic.pic_id and outings.pic2_id=pic.pic_id and
outings.pic3_id=pic.pic_id",$db) or die(mysql_error());

Nothing is returned. The query runs ok(nothing from mysql_error). When I
drop outings.pic2_id=pic.pic_id and outings.pic3_id=pic.pic_id from the
query works and returns the path of the pic.

I'm fairly certain that the above returns nothing because of the multiple
pic.pic_id's in the query.  But I don't know what to do get it
working(Redesign? or Is there something I could change in the query?)

Thanks in advance for any help,
Mike
sql,mysql


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.330 / Virus Database: 184 - Release Date: 2/28/02


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to