Re: [PHP] left join does not work, why?

2009-03-15 Thread Jan G.B.
2009/3/15 PJ : >> -Original Message- >> From: Jan G.B. [mailto:ro0ot.w...@googlemail.com] >> so this is just wrong: >> $x = " select * >> // from foo >> from bar"; >> and that query would be valid >> "SELECT this/*, that*/ from x" >> > It took ma a bit of thinking, I must say, but the answe

Re: [PHP] left join does not work, why?

2009-03-15 Thread PJ
hp-general@lists.php.net > Subject: Re: [PHP] left join does not work, why? > > 2009/3/15 PJ : > >> Daniel Brown wrote: >> >>> On Sat, Mar 14, 2009 at 19:51, PJ wrote: >>> >>> >>>> $sql1 = "SELECT b.id, b.title,

RE: [PHP] left join does not work, why?

2009-03-15 Thread Marc Christopher Hall
Not to mention if this is written for v 5 then you need to wrap your joins in () -Original Message- From: Jan G.B. [mailto:ro0ot.w...@googlemail.com] Sent: Sunday, March 15, 2009 9:47 AM To: PJ Cc: Daniel Brown; php-general@lists.php.net Subject: Re: [PHP] left join does not work, why

Re: [PHP] left join does not work, why?

2009-03-15 Thread Jan G.B.
2009/3/15 PJ : > Daniel Brown wrote: >> On Sat, Mar 14, 2009 at 19:51, PJ wrote: >> >>> $sql1 = "SELECT b.id, b.title, b.sub_title, b.descr, b.comment, >>> b.bk_cover, b.copyright, b.ISBN, b.language, b.sellers, c.publisher, <--- >>> CONCAT_WS(' ', first_name, last_name) AS Author >>> FROM book AS

Re: [PHP] left join does not work, why?

2009-03-15 Thread 9el
--- Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a Free CD of Ubuntu mailed to your door without any cost. Visit : www.ubuntu.com -- On

Re: [PHP] left join does not work, why?

2009-03-15 Thread PJ
Daniel Brown wrote: > On Sat, Mar 14, 2009 at 19:51, PJ wrote: > >> $sql1 = "SELECT b.id, b.title, b.sub_title, b.descr, b.comment, >> b.bk_cover, b.copyright, b.ISBN, b.language, b.sellers, c.publisher, <--- >> CONCAT_WS(' ', first_name, last_name) AS Author >> FROM book AS b >> LEFT JOIN book

Re: [PHP] left join does not work, why?

2009-03-14 Thread Daniel Brown
On Sat, Mar 14, 2009 at 19:51, PJ wrote: > $sql1 = "SELECT b.id, b.title, b.sub_title, b.descr, b.comment, > b.bk_cover, b.copyright, b.ISBN, b.language, b.sellers, c.publisher, <--- > CONCAT_WS(' ', first_name, last_name) AS Author > FROM book AS b > LEFT JOIN book_author AS ab ON b.id = ab.bookI

[PHP] left join does not work, why?

2009-03-14 Thread PJ
$sql1 = "SELECT b.id, b.title, b.sub_title, b.descr, b.comment, b.bk_cover, b.copyright, b.ISBN, b.language, b.sellers, c.publisher, <--- CONCAT_WS(' ', first_name, last_name) AS Author FROM book AS b LEFT JOIN book_author AS ab ON b.id = ab.bookID LEFT JOIN author AS a ON ab.authID=a.id LEFT JOIN