encode and decode

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ricky

    #1

    encode and decode

    I want to use encode and decode in a varchar field size 100.
    This would just hold last and first names.
    Would this give me any porblems?

    thanks for any help!
    Ricky


  • steve

    #2
    Re: encode and decode

    "Ricky" wrote:[color=blue]
    > I want to use encode and decode in a varchar field size 100.
    > This would just hold last and first names.
    > Would this give me any porblems?
    >
    > thanks for any help!
    > Ricky[/color]

    I assume you mean you want to stuff both first and last names into a
    single field.

    No problem. Do it like this:
    assume
    $firstname="ric ky";
    $lastname="mart in";

    Then save it as
    $crunched = serialize( array($firstnam e, $lastname));
    save $crunced into db.

    Once you read it back, to unserialize, and parse the element of the
    resulting array.

    --
    http://www.dbForumz.com/ This article was posted by author's request
    Articles individually checked for conformance to usenet standards
    Topic URL: http://www.dbForumz.com/mySQL-encode...ict134657.html
    Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=450213

    Comment

    • Ricky

      #3
      Re: encode and decode


      I read that it is recommended using a blob field when using encode and
      decode functions ?



      "Ricky" <rfidler2004@ea rthlink.net> wrote in message
      news:to9Oc.2075 $9Y6.1779@newsr ead1.news.pas.e arthlink.net...[color=blue]
      > I want to use encode and decode in a varchar field size 100.
      > This would just hold last and first names.
      > Would this give me any porblems?
      >
      > thanks for any help!
      > Ricky
      >
      >[/color]


      Comment

      Working...