Re: [PHP] looping through an array problem

2005-06-06 Thread Jochem Maas
Jack Jackson wrote: Forgive me if this comes twice: my ISP had a service blackout for three hours and I don't know what went: If my last post read (and I see that it did) that I was defending myself as opposed to falling ALL OVER my sword, I apologize: allow me to be clear: No, you're all cor

Re: [PHP] looping through an array problem

2005-06-05 Thread Jack Jackson
If my last post read (and I see that it did) that I was defending myself as opposed to falling ALL OVER my sword, I apologize: allow me to be clear: No, you're all correct and M. Sokolewicz doubly so: I had unintentionally selected fields from the wrong table for no reason other than lack of

Re: [PHP] looping through an array problem

2005-06-05 Thread Jack Jackson
Ah. I just remembered one reason I had done it involving the art_id field: I have more publishers in the db than are currently associated with artworks. I don't want a publisher to appear unless there is at least one image associated with it. So I did this to avoid having people see a link to

Re: [PHP] looping through an array problem

2005-06-05 Thread Jack Jackson
Forgive me if this comes twice: my ISP had a service blackout for three hours and I don't know what went: If my last post read (and I see that it did) that I was defending myself as opposed to falling ALL OVER my sword, I apologize: allow me to be clear: No, you're all correct and M. Sokolewic

Re: [PHP] looping through an array problem

2005-06-05 Thread Jochem Maas
Jack Jackson wrote: M. Sokolewicz wrote: Jack Jackson wrote: 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_i

Re: [PHP] looping through an array problem

2005-06-05 Thread Jack Jackson
M. Sokolewicz wrote: Jack Jackson wrote: 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 f

Re: [PHP] looping through an array problem

2005-06-05 Thread M. Sokolewicz
Jack Jackson wrote: 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 th

Re: [PHP] looping through an array problem

2005-06-05 Thread Jack Jackson
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. Thanks all! Jochem Ma

Re: [PHP] looping through an array problem

2005-06-05 Thread Brian V Bonini
On Sun, 2005-06-05 at 16:37, Jack Jackson wrote: > This is something dumb I am doing but: > > Trying to pull all names of publishers in db. This sql: > > SELECT art.art_id,art.publisher_id,publisher.publisher_name, > FROM art > LEFT JOIN publisher > ON publisher.publisher_id=art.publisher_id > >

Re: [PHP] looping through an array problem

2005-06-05 Thread Jochem Maas
Jack Jackson wrote: This is something dumb I am doing but: Trying to pull all names of publishers in db. This sql: its a mysql question in disguise, maybe...: SELECT DISTINCT art.art_id,art.publisher_id,publisher.publisher_name FROM art LEFT JOIN publisher ON publisher.publisher_id=art.publi

Re: [PHP] looping through an array problem

2005-06-05 Thread Paul Waring
On 6/5/05, Jack Jackson <[EMAIL PROTECTED]> wrote: > I'd like to stop the NY Sun from appearing twice! What have i missed here? There's nothing wrong with your PHP code as such (although you could filter out duplicates there if you wanted), all you should need to do is add the DISTINCT keyword to

Re: [PHP] looping through an array problem

2005-06-05 Thread Mark Cain
One way to do it is to change this : $pub_sidebar[] = " To: Sent: Sunday, June 05, 2005 4:37 PM Subject: [PHP] looping through an array problem > This is something dumb I am doing but: > > Trying to pull all names of publishers in db. This sql: > > SELECT art.art

[PHP] looping through an array problem

2005-06-05 Thread Jack Jackson
This is something dumb I am doing but: Trying to pull all names of publishers in db. This sql: SELECT art.art_id,art.publisher_id,publisher.publisher_name, FROM art LEFT JOIN publisher ON publisher.publisher_id=art.publisher_id pulls (in phpmyadmin) four rows: artID pubID Publisher_name