Hi, From : https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24379#c1
This query does not return rows where login_attempts IS NULL. It will return accounts where login_attempts = 0
I only recently understood the behavior or NULL values in SQL queries for NOT IN and !=. Should be advice this in coding guide lines ? Is there a syntax better than another : col!=value / not(col=value) ? Best regards đ -- Fridolin SOMERS <fridolin.somers@biblibre.com> Software and system maintainer đŚ BibLibre, France
I think col != value is the most common. I'm wary of more convoluted conditions like not(col = value) as when reading code it makes you wonder if the original author thought it did some extra magic. On Thu, 5 Nov 2020 at 14:35, Fridolin SOMERS <fridolin.somers@biblibre.com> wrote:
Hi,
From : https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24379#c1
This query does not return rows where login_attempts IS NULL. It will return accounts where login_attempts = 0
I only recently understood the behavior or NULL values in SQL queries for NOT IN and !=.
Should be advice this in coding guide lines ? Is there a syntax better than another : col!=value / not(col=value) ?
Best regards đ
-- Fridolin SOMERS <fridolin.somers@biblibre.com> Software and system maintainer đŚ BibLibre, France _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
participants (2)
-
Campbell, Colin -
Fridolin SOMERS