Spaghetti code

How to get rid of very long search strings

Lookup your variables beforehand, then feed them into your search for cleaner, easier to read code. I also use the comment tags ([!] and [/!]) to hide linebreaks in order to make the search string easier to read.

[text]blah=[lookup etc...][/text]
[text]blahblah=[lookup etc...][/text]

[search db=some.db&[!]
[/!]eqFIELDNAMEdatarq=[url][blah][/url]&[!]
[/!]geFIELDNAME2datarq=[url][blahblah][/url]&[!]
[/!]FIELDNAME2type=num&[!]
[/!]asFIELDNAME2sort=1&[!]
[/!]etc[!]
[/!]]

[founditems]
[fields_from_found_records]
[/founditems]
[/search]



DOWNLOAD WEBDNA NOW!

Top Articles:

WebDNA Libraries

A list of available libraries for WebDNA...

Download WebDNA Applications

WebDNA applications...

F.A.Q

A compilation of some user's questions...

Tips and Tricks

A list of user-submitted tips ...

[biotype]

BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

Related Readings:

Annoying character on writefile

How do I get rid of or convert the line feed character during a writefile?...

Redefining [date] & [time] to match your time zone

Your server is not always in the same time zone as your web site...

Handling credit card numbers

Encrypting the credit card numbers does the job quite nicely...

How to create a RSS feed

How to create a RSS feed from yourdatabase on formation...

reCAPTCHA code

reCAPTCHA helps prevent automated abuse of your site (such as comment spam or bogus registrations) by using a CAPTCHA to ensure that only humans perform certain actions...

Spaghetti code

How to get rid of very long search strings...