Use SQL and HTML with Lightweight Language
In this page, I'll show you how to use SQL and HTML simply. If you can write program almost in HTML and SQL, development process become very simple.
In this page, focusing on SELECT sentence of SQL, because this sentence returuns table data. The INSERT, UPDATE and DELETE do not return value, so just write and execute them.
Sample of SELECT sentence in the sample project
In the sample project, program and HTML in "/ALINOUS_HOME/select/" folder is good to learn it.
The script "show.alns" is good example.
show.alns
This script executes SELECT. The SELECT sentence has "INTO" clause. This specify array variable to return the result records of SELECT sentence.
The form before execute "show.alns" is "index.html". The form in this HTML posts form parameter to "show.alns". You can specify parameter by "$IN" variable.
index.html
After adjusting returned variable. show them in the HTML.
Adjust where section
I guess you find "ADJUST_WHERE = TRUE" in the SELECT sentence.
This means if the expression contains NULL variable, automatically ignore the expression.
When the form parameter's value is ""(blank string) and the attribute nemed "alns:ignoreBlank" set true, the parameter's value become NULL.
Edit variables in the script
The array variable returned by SELECT sentence is normal variable. So you can edit it in the script.