projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5786a6
)
CRM-12133: Changed OptionValue's auto-increment function to use numeric comparison...
author
Kirk Jackson
<kirk@caat.org.uk>
Tue, 2 Apr 2013 16:41:51 +0000
(17:41 +0100)
committer
Kirk Jackson
<kirk@caat.org.uk>
Tue, 2 Apr 2013 16:41:51 +0000
(17:41 +0100)
CRM/Core/BAO/OptionValue.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/BAO/OptionValue.php
b/CRM/Core/BAO/OptionValue.php
index edc771bf333f87a8757eb3ec0dc8b9ffa6bba20e..1aba33a61827d5e3e50a5b7d90621a30847e3fc9 100644
(file)
--- a/
CRM/Core/BAO/OptionValue.php
+++ b/
CRM/Core/BAO/OptionValue.php
@@
-111,7
+111,7
@@
class CRM_Core_BAO_OptionValue extends CRM_Core_DAO_OptionValue {
}
$bao->selectAdd();
$bao->whereAdd("value REGEXP '^[0-9]+$'");
- $bao->selectAdd('(ROUND(COALESCE(MAX(
value
),0)) +1) as nextvalue');
+ $bao->selectAdd('(ROUND(COALESCE(MAX(
CONVERT(value, UNSIGNED)
),0)) +1) as nextvalue');
$bao->find(TRUE);
return $bao->nextvalue;
}