From a5fcb369fb411d8ed3a945105a89a146ab96052e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 11 Aug 2007 14:14:46 +0000 Subject: - Patch #166205 by hswong3i: improved database compatibility of db_result(). Makes it work with DB2, Oracle, etc. --- modules/comment/comment.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 3f23fdd78..b5eccdef1 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1398,7 +1398,7 @@ function comment_validate($edit) { if (!$user->uid || isset($edit['is_anonymous'])) { if (variable_get('comment_anonymous', COMMENT_ANONYMOUS_MAYNOT_CONTACT) > COMMENT_ANONYMOUS_MAYNOT_CONTACT) { if ($edit['name']) { - $taken = db_result(db_query("SELECT COUNT(uid) FROM {users} WHERE LOWER(name) = '%s'", $edit['name']), 0); + $taken = db_result(db_query("SELECT COUNT(uid) FROM {users} WHERE LOWER(name) = '%s'", $edit['name'])); if ($taken != 0) { form_set_error('name', t('The name you used belongs to a registered user.')); -- cgit v1.2.3