Aptilis Database Example
Using:
Basically Programming Articles




You can search for an article using the author's first name,
as well as by using an "*" as a wildcard in any position.


Here's a couple examples:

*  ---> "Search..."
...Will display all articles.

W* ---> "Search..."
...Will display all articles in which the Author's name begins with "W".
// The Aptilis Code: (saved as articles.e.txt) // (Watch out... major line wrap ahead!) // Code: sub main() print("Content-Type: text/html\n\n") print("\n") print("\n\n\n") print("\n") print("
") print("

Basically Programming Article Index

") print("
") n = LoadDataBase(db[], "/home/dcwebenterprises/www/articles.txt") print(int(n)$," record(s)
\n") if n < 1 print("The database is empty\n") return 0 end if // A loop to get ALL the matching records. n = 0 x = 0 repeat x = GetRecordIndexByNearKey(db[], search$, 0, x) if x != -1 r = db[x] $ // HTML Output: print("Author: ", getfield(r$,0)$, "
\n") print("Article Title: ", getfield(r$, 1)$, "
\n") print("Date Written: ", getfield(r$, 2)$, "
\n") print("
\n") n = n + 1 x = x + 1 end if until x = -1 print("Found: ", int(n)$, " record") if n > 1 // This adds an 's' at the end of records // to be grammatically correct in case of plural. print("s") end if //This is the start of the recursive search form print("
") print("
") print("
\n") print("\n") print("Search Again?") print("
") print("\n\n") print("

") print("") print("
") print("
") print("
\n\n\n") end main // Our Data File: (saved as articles.txt) //Code: "Michael S. Sanders","A Primer on Hungarian Notation","07/19/2002" "Thomas C. McIntire","Basic File Integrity Techniques","04/30/2003" "Jerry Fielden (With Roy Scott)","Conascii","03/13/2003" "Thomas C. McIntire","Designing Games Humans Can Play","07/13/2003" "Thomas C. McIntire","First Love","03/19/2003" "Thomas C. McIntire","How To Save The BYTEs","03/19/2003" "Thomas C. McIntire","Lost Essence of BASIC, The","06/12/2003" "Thomas C. McIntire","Low-Tech Data Processing ","03/20/2003" "Thomas C. McIntire","Porting GW-BASIC To QuickBasic","03/10/2003" "Roy Scott","Programs I Use Most Often, The","06/07/2003" "Thomas C. McIntire","QB 2.0 Compiling","03/11/2003" "Jerry Muelver","TWIT Rapid Development System, The","06/16/2003" "Thomas C. McIntire","Use of User Defined Functions","12/15/2003" "Thomas C. McIntire","When PCOPY Is Not Enough","03/25/2003" "Thomas C. McIntire","Which Programming Language?","03/25/2003" "Thomas C. McIntire","Whiz vs. WhizBAM","03/25/2003" "Richard D. Clark","Why Atom?","04/12/2003" "Thomas C. McIntire","Why LLIST and LPRINT No Longer Work","02/02/2003" "Roy Scott","Advice To Microdevelopers","09/04/2003" "Staff","Atom' Language, The","04/09/2003" "Roy Scott","Hobby Programming","05/01/2003" "Roy Scott","To API Or Not To API?","11/15/2003" "Wayne Anthony","Envelop","03/15/2003" "Roy Scott","WikiWriter 3","07/11/2003" "Roy Scott","wxBasic","03/15/2003" // Well it's not much of an example and I can't take credit for much of the //coding (modified from samples), but it's a starting place at least... //Maybe I'll eventually figure out how to set up the proper HTML to actually display //working links from the database file. //-Doc-