Here's a handy way to export your data to a text or Excel file
numero = 174[text]db=YourDatabaseName.db[/text][showif [exportfulldata]=t][writefile secure=f&file=FullData_[date %m%d%y].xls][listfields db=[db]][fieldname]tab[showif [index]=1][text]firstfield=[fieldname][/text][/showif][/listfields]return[search db=[db]&NE[firstfield]datarq=[blank]&Rank=off][founditems][listfields db=[db]][interpret][[fieldname]][/interpret]tab[/listfields]return[/founditems][/search][/writefile]Here is your export:Custom Database ExportOften, you'll want to provide an export for the client, and your database may contain fields that are not relevant, or have fieldnames that are not user-friendly, or contain passwords. You will also probably want to sort in a specific manner, and extract only a subset of records. This is an example using a membership database. Instead of exporting the MemberID field, I leave a blank header for the first column, and simply let [index] provide a running count.FullData_[date %m%d%y].xls | [/showif]Export Full Data
Edit this to match whatever records, sorting, fields, and output name you wish.
[showif [exportdata]=t][writefile secure=f&file=YourData_[date %m%d%y].xls][search db=YourDatabase.db&neMemberIDdatarq=[blank]&lnamesort=1&fnamesort=2]tabFirst NametabLast NametabEmailtabPhonetabCelltabFaxtabAddress1tabAddress2tabCitytabStatetabZipreturn[founditems][index]tab[fname]tab[lname]tab[email]tab[Phone]tab[Cell]tab[Fax]tab[addr1]tab[addr2]tab[City]tab[State]tab[Zip]return[/founditems][/search][/writefile]Here is your export:How often are you asked to pull data out of your website? It only takes a small bit of code to make this happen. There are two modules here; one to export the entire database, and another to export a custom set of fields and records. Note: Usually things like this belong behind an admin password.YourData_[date %m%d%y].xls | [/showif]Export Custom Data
[text]db=YourDatabaseName.db[/text]
[showif [exportfulldata]=t]
[writefile secure=f&file=FullData_[date %m%d%y].xls]
[listfields db=[db]][fieldname]tab[showif [index]=1][text]firstfield=[fieldname][/text][/showif][/listfields]return
[search db=[db]&NE[firstfield]datarq=[blank]&Rank=off]
[founditems]
[listfields db=[db]][interpret][[fieldname]][/interpret]tab[/listfields]return
[/founditems]
[/search]
[/writefile]
Here is your export:FullData_[date %m%d%y].xls | [/showif]
[thisurl]?exportfulldata=t">Export Full Data
Edit this to match whatever records, sorting, fields, and output name you wish.
[showif [exportdata]=t]
[writefile secure=f&file=YourData_[date %m%d%y].xls]
[search db=YourDatabase.db&neMemberIDdatarq=[blank]&lnamesort=1&fnamesort=2]
tabFirst NametabLast NametabEmailtabPhonetabCelltabFaxtabAddress1tabAddress2tabCitytabStatetabZipreturn
[founditems]
[index]tab[fname]tab[lname]tab[email]tab[Phone]tab[Cell]tab[Fax]tab[addr1]tab[addr2]tab[City]tab[State]tab[Zip]return
[/founditems]
[/search]
[/writefile]
Here is your export:YourData_[date %m%d%y].xls | [/showif]
[thisurl]?exportdata=t">Export Custom Data
DOWNLOAD WEBDNA NOW!
A list of user-submitted tips ...
Download WebDNA ApplicationsWebDNA applications...
AWS Raw WebDNA LAMP-Plus WebServerAmazon Web Services (AWS) README for Machine Image ID...
WebDNA ModulesA list of the currently available modules...
Technical Change HistoryThis Technical Change History provides a reverse chronological list of WebDNA changes...
[biotype]BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...
This small script finds the number of working days between two dates...
random password-generator codeGenerate a random alpha-numeric string...
How old am I?You want to express an age in years given the dob (mm/dd/yyyy) and today's date...
Export data to ExcelHere's a handy way to export your data to a text or Excel file...
Database backupHow to make a backup of your databases...
Setting a 30-minute CookieConfiguring the expires time for a short-term cookie is tricky...