Re: looping through an array problem
| From: | Jochem Maas | Date: | Sun, 05 Jun 2005 23:18:20 +0000 |
| Subject: | Re: looping through an array problem | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-216446@lists.php.net to get a copy of this message | ||
Jack Jackson wrote:
M. Sokolewicz wrote:Er, Jack - your original query was: SELECT art.art_id,art.publisher_id,publisher.publisher_name, FROM art LEFT JOIN publisher ON publisher.publisher_id=art.publisher_id which is a selection on the art table... ( with a typo) if you did: SELECT art.publisher_id,publisher.publisher_name FROM art LEFT JOIN publisher ON publisher.publisher_id=art.publisher_id nothing would change. and if you did: SELECT publisher.publisher_id,publisher.publisher_name publisher i.e. not 'unintentionally' selecting from the arts table. then you would not have had a problem in the first place?! I think I'm missing something ;-)Jack Jackson wrote:Er, yes, that was what I meant: I had unintentionally included that bit.Thank you for your help.Thanks for all the replies. Jochem, thank you for this code, which will take me all night to understand (though I bet it works). I also note that SELECT DISTINCT worked here, too Also as many of you noticed before me, the art_id was in there as a fly in the ointment.by that statement I ment the exact same thing Jochem ment in his 2nd part; I have NO idea why you're selecting *ANYTHING* from the arts table... it's *useless* if you don't need the data...