########################################################## # GDIdb demo script (c) 1997 Global Data Industries # Datasource=workweb.mdb (Access database) # # If you have a large table of data that you'd like to # split across several HTML pages, study this script # for hints on how to do it. ########################################################## ########################################################## # Declare & initialise variables used in script &defvar(?var1?,?categorysize?,?pagenum?,?ptot?,?lcount?,?tmp?) &assign(?pagenum?,1) ########################################################## # ?categorysize? sets the amount of jobs that are placed # on each page. try changing the value from 3 to 4 to see # the effect. &assign(?categorysize?,3) ########################################################## # Print the script information screen &cls &print("WorkWeb 3 Demo Script") &print("------------------------------------") ########################################################## # Declare the database file. &datasource("Driver={Microsoft Access Driver (*.mdb)};DBQ=workweb.mdb") ########################################################## # Start generating the HTML &html("index.html") {
# select all of the data in the "jobs" table
&sql("SELECT * FROM Jobs")
{
&assign(?ptot?,?recordsetsize?/?categorysize?)
# only create job pages & links if the database
# actually contains some vacancies!
&if(?recordsetsize?>0)
{
Select a link:
# create a page with ?categorysize? number of # jobs on it (by calling subroutine &datapage) &datapage } The database is currently empty. } } |
This Site demonstrates the use of GDI's Database publishing software. A database consisting of a large table of jobs is broken down into manageable chunks before being merged with the web site HTML and passed to the web server automatically. |
System Bullet points:
|
![]() |
Jobs ?rownumber?-?var1? |