fix: controlli sul database

This commit is contained in:
valentina 2024-10-31 10:10:02 +01:00
parent abdd552109
commit 3a52378a6f
1 changed files with 5 additions and 2 deletions

View File

@ -195,7 +195,10 @@ if (!empty($results) || !empty($results_added) || !empty($results_settings) || !
} else {
$null = 'NULL';
}
$query .= str_replace('DEFAULT_GENERATED', ' ', $data[$table][$name]['extra']).' '.$null.' DEFAULT '.$data[$table][$name]['default'].';';
$query .= str_replace('DEFAULT_GENERATED', ' ', $data[$table][$name]['extra']).' '.$null;
if ($data[$table][$name]['default']) {
$query .= ' DEFAULT '.$data[$table][$name]['default'];
}
}
echo '
@ -204,7 +207,7 @@ if (!empty($results) || !empty($results_added) || !empty($results_settings) || !
'.$name.'
</td>
<td>
'.$query.'
'.$query.';
</td>
</tr>';