Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
metaform: fixed SQL for decimal and other weird numeric types
[wfpl.git]
/
metaform.php
diff --git
a/metaform.php
b/metaform.php
index
f7a5740
..
e9c73ec
100644
(file)
--- a/
metaform.php
+++ b/
metaform.php
@@
-170,7
+170,7
@@
function make_sql() {
if($sql != 'n/a') {
$tem->set('name', $name);
$tem->set('type', $sql);
if($sql != 'n/a') {
$tem->set('name', $name);
$tem->set('type', $sql);
- if($sql == 'int') {
+ if(substr($sql, 0, 3) == 'int' || substr($sql, 0, 7) == 'decimal') {
$tem->set('default', '0');
} elseif($format == 'yesno') {
$tem->set('default', '"No"');
$tem->set('default', '0');
} elseif($format == 'yesno') {
$tem->set('default', '"No"');