mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merged revisions 46622 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq ........ r46622 | ischommer | 2007-12-12 10:54:32 +1300 (Wed, 12 Dec 2007) | 1 line added Double dbfield for extended precision (e.g. when saving map-coordinates) ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52154 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ddd3ef3c34
commit
647d295fe3
15
core/model/fieldtypes/Double.php
Normal file
15
core/model/fieldtypes/Double.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class Double extends DBField {
|
||||||
|
|
||||||
|
function requireField() {
|
||||||
|
DB::requireField($this->tableName, $this->name, "double");
|
||||||
|
}
|
||||||
|
|
||||||
|
function Nice() {
|
||||||
|
return number_format($this->value, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
Loading…
Reference in New Issue
Block a user