You can also do:<br><br><div style="margin-left: 40px;">WHERE YEAR(datetime) = 2009 AND MONTH(datetime) = 6<br clear="all"></div><br>I tend to prefer that one, since it is easy to update/increment and you don't have to remember how many days are in a given month for that specific year. <br>
-- <br>Joe Atzberger<br>LibLime - Open Source Library Solutions<br><br><div class="gmail_quote">On Thu, Jul 9, 2009 at 1:30 PM, Greg Barniskis <span dir="ltr"><<a href="mailto:gregb@scls.lib.wi.us">gregb@scls.lib.wi.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
WHERE type= 'issue' AND datetime > '2009-06-01' AND datetime < '2009-06-30'<br>
<br>
Is that right? Keeping in mind that I'm no Koha expert, much less expert<br>
in MySQL, I could easily be wrong. But in more general db work, I was<br>
always taught that a bare date stamp equated to a time stamp of midnight<br>
(the start of that date).<br>
<br>
Thus a WHERE clause of "less than date" would technically exclude<br>
anything that was actually on that date. I was told to use<br>
<br>
< '2009-07-01'<br>
<br>
if I wanted to include everything up to '2009-06-30 23:59:59'.<br>
<br>
Right? Wrong? Conditional?<br>
<br>
--<br>
<font color="#888888">Greg Barniskis, Computer Systems Integrator<br>
South Central Library System (SCLS)<br>
Library Interchange Network (LINK)<br>
<gregb at <a href="http://scls.lib.wi.us" target="_blank">scls.lib.wi.us</a>>, (608) 266-6348<br>
_______________________________________________<br>
Koha mailing list<br>
<a href="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</a><br>
<a href="http://lists.katipo.co.nz/mailman/listinfo/koha" target="_blank">http://lists.katipo.co.nz/mailman/listinfo/koha</a><br>
</font></blockquote></div><br>