<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Nicole,<br>
<br>
I don't know why you do not get error but I detected few one.<br>
<br>
issues.due_date doesn't exists. It's date due.<br>
the syntaxe of LEFT JOIN is LEFT JOIN <i>table</i> ON, not LEFT JOIN
ON <i>table.<br>
</i>I also use the INTERVAL 1 DAY, instead of +1 DAYS.<br>
<br>
Here is your final request:<br>
<br>
<blockquote type="cite"><code class="sql"><span class="syntax"><span
class="syntax_alpha syntax_alpha_reservedWord">SELECT</span> <span
class="syntax_alpha syntax_alpha_identifier">borrowers</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">cardnumber</span><span
class="syntax_punct syntax_punct_listsep">,</span> <span
class="syntax_alpha syntax_alpha_identifier">borrowers</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">surname</span><span
class="syntax_punct syntax_punct_listsep">,</span> <span
class="syntax_alpha syntax_alpha_identifier">borrowers</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">firstname</span><span
class="syntax_punct syntax_punct_listsep">,</span> <span
class="syntax_alpha syntax_alpha_identifier">issues</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">date_due</span><span
class="syntax_punct syntax_punct_listsep">,</span> <span
class="syntax_alpha syntax_alpha_identifier">items</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">barcode</span><span
class="syntax_punct syntax_punct_listsep">,</span> <span
class="syntax_alpha syntax_alpha_identifier">biblio</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">title</span><span
class="syntax_punct syntax_punct_listsep">,</span> <span
class="syntax_alpha syntax_alpha_identifier">biblio</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">author</span><br>
<span class="syntax_alpha syntax_alpha_reservedWord"> FROM</span> <span
class="syntax_alpha syntax_alpha_identifier">borrowers</span><span
class="syntax_white syntax_white_newline"></span><br>
<span class="syntax_alpha syntax_alpha_reservedWord"> LEFT</span> <span
class="syntax_alpha syntax_alpha_reservedWord">JOIN</span> <span
class="syntax_alpha syntax_alpha_identifier">issues</span> <span
class="syntax_alpha syntax_alpha_reservedWord">ON</span> <span
class="syntax_punct syntax_punct_bracket_open_round">(</span> <span
class="syntax_alpha syntax_alpha_identifier">issues</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">borrowernumber</span> <span
class="syntax_punct">=</span> <span
class="syntax_alpha syntax_alpha_identifier">borrowers</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">borrowernumber</span> <span
class="syntax_punct syntax_punct_bracket_close_round">)</span> <span
class="syntax_white syntax_white_newline"></span><br>
<span class="syntax_alpha syntax_alpha_reservedWord"> LEFT</span> <span
class="syntax_alpha syntax_alpha_reservedWord">JOIN</span> <span
class="syntax_alpha syntax_alpha_identifier">items</span> <span
class="syntax_alpha syntax_alpha_reservedWord">ON</span> <span
class="syntax_punct syntax_punct_bracket_open_round">(</span> <span
class="syntax_alpha syntax_alpha_identifier">issues</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">itemnumber</span> <span
class="syntax_punct">=</span> <span
class="syntax_alpha syntax_alpha_identifier">items</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">itemnumber</span> <span
class="syntax_punct syntax_punct_bracket_close_round">)</span> <span
class="syntax_white syntax_white_newline"></span><br>
<span class="syntax_alpha syntax_alpha_reservedWord"> LEFT</span> <span
class="syntax_alpha syntax_alpha_reservedWord">JOIN</span> <span
class="syntax_alpha syntax_alpha_identifier">biblio</span> <span
class="syntax_alpha syntax_alpha_reservedWord">ON</span> <span
class="syntax_punct syntax_punct_bracket_open_round">(</span> <span
class="syntax_alpha syntax_alpha_identifier">biblio</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">biblionumber</span> <span
class="syntax_punct">=</span> <span
class="syntax_alpha syntax_alpha_identifier">items</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">biblionumber</span> <span
class="syntax_punct syntax_punct_bracket_close_round">)</span> <span
class="syntax_white syntax_white_newline"></span><br>
<span class="syntax_alpha syntax_alpha_reservedWord">WHERE</span> <span
class="syntax_alpha syntax_alpha_identifier">issues</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">date_due</span> <span
class="syntax_punct">=</span> <span
class="syntax_alpha syntax_alpha_functionName">DATE_ADD</span><span
class="syntax_punct syntax_punct_bracket_open_round">(</span> <span
class="syntax_alpha syntax_alpha_functionName">curdate</span><span
class="syntax_punct syntax_punct_bracket_open_round">(</span> <span
class="syntax_punct syntax_punct_bracket_close_round">)</span> <span
class="syntax_punct syntax_punct_listsep">,</span> <span
class="syntax_alpha syntax_alpha_reservedWord">INTERVAL</span> <span
class="syntax_digit syntax_digit_integer">1</span> <span
class="syntax_alpha syntax_alpha_reservedWord">DAY</span> <span
class="syntax_punct syntax_punct_bracket_close_round">)</span> <span
class="syntax_white syntax_white_newline"></span><br>
<span class="syntax_alpha syntax_alpha_reservedWord">ORDER</span> <span
class="syntax_alpha syntax_alpha_reservedWord">BY</span> <span
class="syntax_alpha syntax_alpha_identifier">borrowers</span><span
class="syntax_punct syntax_punct_qualifier">.</span><span
class="syntax_alpha syntax_alpha_identifier">surname</span> <span
class="syntax_alpha syntax_alpha_reservedWord">ASC</span> <span
class="syntax_white syntax_white_newline"></span><span
class="syntax_alpha syntax_alpha_reservedWord"></span><span
class="syntax_digit syntax_digit_integer"><br>
</span></span></code></blockquote>
--<br>
Eric Bégin<br>
<a class="moz-txt-link-freetext" href="http://www.inLibro.comf">http://www.inLibro.comf</a><br>
<br>
Nicole Engard wrote:
<blockquote
cite="mid:d35b50d40908120516pe62e893y320d9fb6a65cc4e@mail.gmail.com"
type="cite">I'm trying to write a report that shows all patrons who
have items due tomorrow. I'm probably missing one step in this report,
I don't get an error, but I also don't get any results - ideas?<br>
<br>
<br>
SELECT
borrowers.cardnumber,borrowers.surname,borrowers.firstname,issues.due_date,items.barcode,biblio.title,biblio.author
FROM borrowers LEFT JOIN issues on
(issues.borrowernumber=borrowers.borrowernumber) LEFT JOIN on items
(issues.itemnumber=items.itemnumber) LEFT JOIN on biblio
(biblio.biblionumber=items.biblionumber) WHERE issues.date_due =
DATE_ADD(curdate()+1 DAYS) ORDER BY borrowers.surname asc<br>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Koha mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</a>
<a class="moz-txt-link-freetext" href="http://lists.katipo.co.nz/mailman/listinfo/koha">http://lists.katipo.co.nz/mailman/listinfo/koha</a>
</pre>
</blockquote>
</body>
</html>