I mean this bit to check where both columns are 0 or NULL. We're just making sure there are actually any banned users without discussions or comments to their name. If there aren't, the query wouldn't do anything.
I have found this: NULL on both columnshttp://imgur.com/a/gxvIZ
@matamata said: I have found this: NULL on both columnshttp://imgur.com/a/gxvIZ
Then that:
@Caylus said: @R_J said: CountComments and CountDiscussions might be NULL and you have strict mode enabled? ^^ This. Could you try: DELETE FROM gdn_user WHERE Banned = 1 AND CountComments = NULL AND CountDiscussions = NULL
@Caylus said:
@R_J said: CountComments and CountDiscussions might be NULL and you have strict mode enabled?
^^ This. Could you try: DELETE FROM gdn_user WHERE Banned = 1 AND CountComments = NULL AND CountDiscussions = NULL
should have been DELETE FROM gdn_user WHERE Banned = 1 AND CountComments IS NULL AND CountDiscussions IS NULL
DELETE FROM gdn_user WHERE Banned = 1 AND CountComments IS NULL AND CountDiscussions IS NULL
Sorry for wasting your time with a faulty query Matamata!
I thought NULL was treated as any other value. I apparently was wrong. Thanks @R_J, learned something today!
That worked!! Thank you so much for all the help.@Caylus You do not have to say sorry to me, you've spent time for me, thank you
Comments
I mean this bit to check where both columns are 0 or NULL. We're just making sure there are actually any banned users without discussions or comments to their name. If there aren't, the query wouldn't do anything.
I have found this: NULL on both columns
http://imgur.com/a/gxvIZ
Then that:
should have been
DELETE FROM gdn_user WHERE Banned = 1 AND CountComments IS NULL AND CountDiscussions IS NULL
Sorry for wasting your time with a faulty query Matamata!
I thought NULL was treated as any other value. I apparently was wrong. Thanks @R_J, learned something today!
That worked!!
Thank you so much for all the help.
@Caylus You do not have to say sorry to me, you've spent time for me, thank you