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:

Download WebDNA Applications

WebDNA applications...

F.A.Q

A compilation of some user's questions...

WebDNA reference

A list of all WebDNA instructions...

Tips and Tricks

A list of user-submitted tips ...

WebDNA Libraries

A list of available libraries for WebDNA...

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

Related Readings:

Setting a 30-minute Cookie

Configuring the expires time for a short-term cookie is tricky...

How to keep the text variable after a function has finished

By default...

PayPal gateway

...

Removing whitespace

How can I remove all whitespace entered by a user from an input box (ie card number)...

Formatting a long list in a table

How to show the result of a search as a table...

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

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