projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
831e96f
)
DatabaseColumns.php
author
Alan Knowles
<alan@roojs.com>
Thu, 12 Jun 2014 06:20:37 +0000
(14:20 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 12 Jun 2014 06:20:37 +0000
(14:20 +0800)
DatabaseColumns.php
patch
|
blob
|
history
diff --git
a/DatabaseColumns.php
b/DatabaseColumns.php
index
1115d70
..
66cf4ec
100644
(file)
--- a/
DatabaseColumns.php
+++ b/
DatabaseColumns.php
@@
-65,4
+65,21
@@
class Pman_Core_DatabaseColumns extends Pman {
$this->jdata($ret);
}
-}
\ No newline at end of file
+
+ function typeToName($t)
+ {
+ switch(true) {
+ case ($t & 64): return 'text';
+ case ($t & 32): return 'text';
+ case ($t & 4 && $t & 8): return 'datetime';
+ case ($t & 4): return 'date';
+ case ($t & 8): return 'time';
+ case ($t & 16): return 'bool';
+ case ($t & 2): return 'varchar';
+ case ($t & 1): return 'number';
+
+ }
+ return '??';
+
+ }
+}