[L]Database Edit[/L]

[set interpolate=1 name="arg"][data session arg][/set]

## [L]Table[/L] [value mv_data_table]

## [L]Edit key[/L] [value code]

[if-key-exists table="[value mv_data_table]" key="[value code]"] [L]Update[/L] [L]Insert[/L] [else] [L]Update[/L] [L]Insert[/L] [/else] [/if-key-exists]

[L]Column[/L] | [L]Value[/L]
--- | ---
[if-key-exists table="[value mv_data_table]" key="[value code]"] [substitute name="DBNAME" value="[value mv_data_table]"] [substitute name="KEYNAME" value="[default code]"] [loop arg="[db-columns ~~DBNAME~~]"]
[loop-code] | [display table="~~DBNAME~~" column="[loop-code]" key="~~KEYNAME~~"]
[/loop] [/substitute] [/substitute] [else] [substitute name="DBNAME" value="[value mv_data_table]"] [loop arg="[db-columns ~~DBNAME~~]"]
[loop-code] |
[/loop] [/substitute] [/else] [/if-key-exists]

[scratch menu]