T
HE
M
ETA
-
HTML
L
ANGUAGE
R
EFERENCE
M
ANUAL
[
TOC
]
Edit Documentation Pointer
Function Name:
Manual Section:
Alists
Arithmetic-Operators
Arrays
Authorization-Tags
Code-Profiling
Color-Manipulation
Compiler-Module
Csv-Module
Database-Commands
Dates-And-Times
Debugging-Commands
Direct-Dbm-Access
Dynamic-Modules
Echo-Module
Elsewhen-Module
Example-Module
File-Operators
Flow-Control
Generic-Sql-Interface
Html-Helpers
Image-Module
Language-Operators
Machine-Module
Macro-Commands
Md5-Module
Meta-Html-Tcp/Ip-Servers
Moddate-Module
Network-Appendix
Packages
Page-Operators
Page-Variables
Pagecount-Appendix
Powerstrip-System-Tags
Primitive-Operators
Relational-Operators
Server-Variables
Session-Operators
Session-Server-Module
Statistics-Module
Stream-Operators
String-Operators
Syslog-Module
Using-Gnuplot
Variables
New Section
Function Type:
Simple
Complex
Variable Reference
Search Keywords:
Required Args:
Optional Args:
Keyword Args:
Description:
Save the variables in <var package> associated with the value <var key> in column <var keyname> in the table <var tablename> of the database referenced by <var dbvar>. This only saves variables which have names matching existing table column names. Package prefixes are stripped from the variables, and the symbol name is used as the column name to store the data. Symbol names and column names are treated in a case-insensitive manner. The implementation is to first attempt to do a SQL <code>INSERT</code> into the table, and if that fails to try a <code>UPDATE</code> query, with <var keyname> = <var key>. Example: Say we want to save some information about employee Kate Mulgrew, in a table of employees, which has a primary key field named "id", and we want to save this record with id=103: <example> <set-var record::name="Kate Mulgrew" record::age=45 record::salary=34000 record::dept=travel> .blank <set-var saved? = <sql::database-save-package db 103 record table=employees keyname=id>> </example> If a variable in the package you are saving corresponds to a column with a numeric field type, and the value of the variable is the empty string, the system will attempt to store a NULL value into this field of the record. If the table does not support NULL values on that column, the operation will fail.
The
META-HTML
Reference Manual V2.0
Copyright © 1995, 1998,
Brian J. Fox
Found a bug? Send mail to
bug-manual@metahtml.org