Announcement

Collapse
No announcement yet.

Miva Mistakes to Avoid

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Miva Mistakes to Avoid



    -------------------------------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--

    #2
    Miva Mistakes to Avoid



    ------=_NextPart_000_0030_01C3EA6F.CF32FAC0
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable

    This isn't limited to Miva... many languages treat zero or spaces as
    NOT. On a membership site, I always append something to the beginning =
    of
    their login, such as an "A", then when I do a find, I append the "A" to
    it and MvFIND, and strip the "A" from it when I display it. The members
    do not know their login starts with an "A", but it avoids a lot of
    problems like Miva thinking it's a number string instead of a alpha
    string....
    =20
    Greg
    =20
    =20
    ----- Original Message -----=20

    From: [email protected] <mailto:[email protected]> =20
    To: [email protected] <mailto:[email protected]> =20
    Sent: Tuesday, February 03, 2004 2:49 PM
    Subject: [meu] Miva Mistakes to Avoid

    I don't know if anyone has ever compiled a list of dumb mistakes to
    avoid in Miva.
    =20
    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:
    =20
    <MvDO to get the name>
    <MvIF EXPR=3D"{name}">
    code to process the name
    </MvIF>
    =20
    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.
    =20
    Solutions: (a) change the rules so that names cannot exist entirely of
    zeroes, or (b) change the if-statement to <MvIF
    EXPR=3D"{len(name)}"></MvIF>
    =20
    - Bill



    ------=_NextPart_000_0030_01C3EA6F.CF32FAC0--

    Comment

    Working...
    X