This is great, thanks for the work.

I have a comment and a request.

I wonder if it would be better in this query to check for borrowernumber
being null as well.  That might actually require a union or another
query though.

I request that you also check for itemnumber being null.  It's not a big
deal, but can happen.  That way we only need this one script to clean
the issues table.

On Wed, 2009-02-18 at 21:30 -0600, Joe Atzberger wrote:
> This workaround is necessary until issues table structure is fixed to ensure:
> (1) always a valid borrowernumber (offline circ needs to adapt to handle 
> errors), and
> (2) itemnumber is unique, i.e. only one person can have the item checked out.
> ---
[snip]
> +my $sth = C4::Context->dbh->prepare("SELECT itemnumber, count(*) as count 
> FROM issues GROUP BY itemnumber HAVING count >1;");
[snip]
-- 
Michael Hafen
Systems Analyst and Programmer
Washington County School District
Utah, USA

for Koha checkout
http://koha-dev.washk12.org
or
git://koha-dev.washk12.org/koha

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to