-------------------------------1075837784
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
I don't know if anyone has ever compiled a list of dumb mistakes to
avoid in Miva.
One error that caught up with me a few years ago: Users would assign
their own account names at a website, which were stored in a database.
There was a function which would accept the account id#, and return the
name. If no value was returned, that meant there was no match in the
database. So I would have code that looked like:
<MvDO to get the name>
<MvIF EXPR="{name}">
code to process the name
</MvIF>
This worked fine for several years, until someone decided they wanted
the account name "0000". In which case the name DOES exist, but you
can't get past the if statement with it.
Solutions: (a) change the rules so that names cannot exist entirely of
zeroes, or (b) change the if-statement to <MvIF
EXPR="{len(name)}"></MvIF>
- Bill
-------------------------------1075837784--
Comment