Re: [PHP] difficult select problem

2009-04-09 Thread PJ
Jim Lucas wrote: PJ wrote: Hi Jim, Sorry I could not gat back to you on your suggestion. I've been under the weather for a couple of days but am almost over it. Your suggestion does not work... yet. I'll insert comments questions below... Jim Lucas wrote: PJ wrote: I've searched the

Re: [PHP] difficult select problem

2009-04-09 Thread PJ
OK, so I owe you a big one :-* Your code works... now, I'm faced with a horrendous problem and that is to make sense of it all :-) What I seem to get from this exercise is that I don't need the ordinals at all. Uuuuh... that's interesting. I get it. So now, I can update my bookInsert script

Re: [PHP] difficult select problem

2009-04-09 Thread Andrew Ballard
On Thu, Apr 9, 2009 at 1:39 PM, PJ af.gour...@videotron.ca wrote: [snip] Now the silly questions = often I am curious what effect the differences in code will have on performance. For instance, why are you using author.last_name LIKE '{$Auth}%' rather than LEFT('$Auth') ? As I have mentioned,

Re: [PHP] difficult select problem

2009-04-09 Thread PJ
Andrew Ballard wrote: On Thu, Apr 9, 2009 at 1:39 PM, PJ af.gour...@videotron.ca wrote: [snip] Now the silly questions = often I am curious what effect the differences in code will have on performance. For instance, why are you using author.last_name LIKE '{$Auth}%' rather than

Re: [PHP] difficult select problem

2009-04-08 Thread PJ
Hi Jim, Sorry I could not gat back to you on your suggestion. I've been under the weather for a couple of days but am almost over it. Your suggestion does not work... yet. I'll insert comments questions below... Jim Lucas wrote: PJ wrote: I've searched the web, the tutorials, etc. with no luck

Re: [PHP] difficult select problem

2009-04-08 Thread Jan G.B.
2009/4/7 Bastien Koert phps...@gmail.com: On Tue, Apr 7, 2009 at 1:10 PM, Michael A. Peters mpet...@mac.com wrote: PJ wrote: Bob McConnell wrote: From: PJ First, let me thank you all for responding and offering suggestions. I appreciate it and I am learning things. However, it looks

Re: [PHP] difficult select problem

2009-04-08 Thread Jim Lucas
PJ wrote: Hi Jim, Sorry I could not gat back to you on your suggestion. I've been under the weather for a couple of days but am almost over it. Your suggestion does not work... yet. I'll insert comments questions below... Jim Lucas wrote: PJ wrote: I've searched the web, the tutorials, etc.

Re: [PHP] difficult select problem

2009-04-08 Thread Jim Lucas
PJ wrote: Gentlemen, First, let me thank you all for responding and offering suggestions. I appreciate it and I am learning things. How about telling us/me what it did or did not do for you? However, it looks like my message is not getting across: The problem is not to retrieve only the

Re: [PHP] difficult select problem

2009-04-07 Thread Jim Lucas
PJ wrote: I've searched the web, the tutorials, etc. with no luck and have asked on MySql list with no luck and have even posted here with no replies. So, let's try again: I am trying to limit the search for books to only those that start with A (does not have to be case sensitive); but within

Re: [PHP] difficult select problem

2009-04-07 Thread PJ
Gentlemen, First, let me thank you all for responding and offering suggestions. I appreciate it and I am learning things. However, it looks like my message is not getting across: The problem is not to retrieve only the authors whose last names begin with A: 1) which books have a second author?

Re: [PHP] difficult select problem

2009-04-07 Thread Lex Braun
PJ, On Tue, Apr 7, 2009 at 11:37 AM, PJ af.gour...@videotron.ca wrote: $SQL = SELECT b.*, c.publisher, a.first_name, a.last_name FROM book AS b LEFT JOIN book_publisher as bp ON b.id = bp.bookID LEFT JOIN publishers AS c ON bp.publishers_id = c.id LEFT JOIN

RE: [PHP] difficult select problem

2009-04-07 Thread Bob McConnell
From: PJ First, let me thank you all for responding and offering suggestions. I appreciate it and I am learning things. However, it looks like my message is not getting across: The problem is not to retrieve only the authors whose last names begin with A: Actually, it appears you simply

Re: [PHP] difficult select problem

2009-04-07 Thread PJ
Bob McConnell wrote: From: PJ First, let me thank you all for responding and offering suggestions. I appreciate it and I am learning things. However, it looks like my message is not getting across: The problem is not to retrieve only the authors whose last names begin with A: Actually, it

Re: [PHP] difficult select problem

2009-04-07 Thread Michael A. Peters
PJ wrote: Bob McConnell wrote: From: PJ First, let me thank you all for responding and offering suggestions. I appreciate it and I am learning things. However, it looks like my message is not getting across: The problem is not to retrieve only the authors whose last names begin with A:

Re: [PHP] difficult select problem

2009-04-07 Thread Bastien Koert
On Tue, Apr 7, 2009 at 1:10 PM, Michael A. Peters mpet...@mac.com wrote: PJ wrote: Bob McConnell wrote: From: PJ First, let me thank you all for responding and offering suggestions. I appreciate it and I am learning things. However, it looks like my message is not getting across: The

Re: [PHP] difficult select problem

2009-04-07 Thread Chris
PJ wrote: Gentlemen, First, let me thank you all for responding and offering suggestions. I appreciate it and I am learning things. However, it looks like my message is not getting across: The problem is not to retrieve only the authors whose last names begin with A: 1) which books have a

Re: [PHP] difficult select problem

2009-04-06 Thread Bastien Koert
On Mon, Apr 6, 2009 at 12:32 PM, PJ af.gour...@videotron.ca wrote: I've searched the web, the tutorials, etc. with no luck and have asked on MySql list with no luck and have even posted here with no replies. So, let's try again: I am trying to limit the search for books to only those that

Re: [PHP] difficult select problem

2009-04-06 Thread PJ
Hi Bastien, Thanks for the suggestion. But my code already does that. I think it is as difficult to formulate the problem in plain English as to figure out how to solve it: The problem is: Within the results some books have 2 authors: 1) is there a second author for any of the books in the

Re: [PHP] difficult select problem

2009-04-06 Thread Lex Braun
PJ, On Mon, Apr 6, 2009 at 12:32 PM, PJ af.gour...@videotron.ca wrote: I am trying to limit the search for books to only those that start with A (does not have to be case sensitive); but within that selection there may be a second author whose name may start with any letter of the alphabet.

Re: [PHP] difficult select problem

2009-04-06 Thread PJ
Hi Lex, Thanks for responding. Indeed, it is a very difficult problem - for me, at least; I think it is as difficult to formulate the problem in plain English as to figure out how to solve it. My code already has selected the books whose authors last names start with A as well as the authors

Re: [PHP] difficult select problem

2009-04-06 Thread Lex Braun
On Mon, Apr 6, 2009 at 2:05 PM, PJ af.gour...@videotron.ca wrote: My code already has selected the books whose authors last names start with A as well as the authors themselves. Within the results some books have 2 authors. If you already have the book IDs where this happens, then for each

Re: [PHP] difficult select problem

2009-04-06 Thread Chris
PJ wrote: I've searched the web, the tutorials, etc. with no luck and have asked on MySql list with no luck and have even posted here with no replies. So, let's try again: I am trying to limit the search for books to only those that start with A (does not have to be case sensitive); but within