Likes Likes:  0
Resultaten 1 tot 5 van de 5
Geen
  1. #1
    Nico Schuyt
    Spaties in MySQL VARCHAR
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Spaties in MySQL VARCHAR

    Volgens de specificaties* worden spaties verwijderd uit VARCHAR-velden vanaf
    versie 5.0.3.

    Op server A en B staat beide MySQL versie 5.0.22
    A (PHP 5.2) verwijdert spaties wel, B (PHP 5.1.4) niet.
    Kan PHP ook van invloed zijn?

    * <http://dev.mysql.com/doc/refman/5.0/en/char.html>
    VARCHAR values are not padded when they are stored. Handling of trailing
    spaces is version-dependent. As of MySQL 5.0.3, trailing spaces are retained
    when values are stored and retrieved, in conformance with standard SQL.
    Before MySQL 5.0.3, trailing spaces are removed from values when they are
    stored into a VARCHAR column; this means that the spaces also are absent
    from retrieved values.

    --
    Nico Schuyt
    http://www.nicoschuyt.nl/



  2. #2
    Ronald Klip
    Spaties in MySQL VARCHAR
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: Spaties in MySQL VARCHAR

    Op 18-11-2006 07:48 schreef Nico Schuyt:
    > Ronald Klip wrote:
    >> Nico Schuyt:

    >
    >>> Volgens de specificaties*

    >> Juist niet,

    > Je hebt helemaal gelijk
    >>> Kan PHP ook van invloed zijn?

    >> Lijkt mij stug.

    > Ehhhh, inderdaad
    > Stom stom ....


    Zo zie je maar, een luisterend oor is het halve werk, ofzo


    --
    groet, Ronald

  3. #3
    Nico Schuyt
    Spaties in MySQL VARCHAR
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: Spaties in MySQL VARCHAR

    Ronald Klip wrote:
    > Nico Schuyt:
    >> Ronald Klip wrote:
    >>> Nico Schuyt:


    >>>> Volgens de specificaties*
    >>> Juist niet,

    >> Je hebt helemaal gelijk
    >>>> Kan PHP ook van invloed zijn?
    >>> Lijkt mij stug.

    >> Ehhhh, inderdaad
    >> Stom stom ....


    > Zo zie je maar, een luisterend oor is het halve werk, ofzo


    Inderdaad :-)
    Bedankt!

    --
    Nico Schuyt
    http://www.nicoschuyt.nl/



  4. #4
    Nico Schuyt
    Spaties in MySQL VARCHAR
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: Spaties in MySQL VARCHAR

    Ronald Klip wrote:
    > Nico Schuyt:


    >> Volgens de specificaties* worden spaties verwijderd uit
    >> VARCHAR-velden vanaf versie 5.0.3.


    > Juist niet, afgaande op je citaat.


    Je hebt helemaal gelijk

    >> Op server A en B staat beide MySQL versie 5.0.22
    >> A (PHP 5.2) verwijdert spaties wel, B (PHP 5.1.4) niet.
    >> Kan PHP ook van invloed zijn?


    > Lijkt mij stug. Zit er niet stiekum een trim() in je script?


    Ehhhh, inderdaad werd er in het ene geval bij inlezen vanuit tekstbestand
    getrimd
    Stom stom ....

    > * <http://dev.mysql.com/doc/refman/5.0/en/char.html>


    --
    Nico Schuyt
    http://www.nicoschuyt.nl/



  5. #5
    Ronald Klip
    Spaties in MySQL VARCHAR
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: Spaties in MySQL VARCHAR

    Op 17-11-2006 08:44 schreef Nico Schuyt:
    > Volgens de specificaties* worden spaties verwijderd uit VARCHAR-velden vanaf
    > versie 5.0.3.


    Juist niet, afgaande op je citaat.

    > Op server A en B staat beide MySQL versie 5.0.22
    > A (PHP 5.2) verwijdert spaties wel, B (PHP 5.1.4) niet.
    > Kan PHP ook van invloed zijn?


    Lijkt mij stug. Zit er niet stiekum een trim() in je script?

    > * <http://dev.mysql.com/doc/refman/5.0/en/char.html>
    > VARCHAR values are not padded when they are stored. Handling of trailing
    > spaces is version-dependent. As of MySQL 5.0.3, trailing spaces are retained
    > when values are stored and retrieved, in conformance with standard SQL.
    > Before MySQL 5.0.3, trailing spaces are removed from values when they are
    > stored into a VARCHAR column; this means that the spaces also are absent
    > from retrieved values.
    >



    --
    groet, Ronald

Webhostingtalk.nl

Contact

  • Rokin 113-115
  • 1012 KP, Amsterdam
  • Nederland
  • Contact
© Copyright 2001-2026 Webhostingtalk.nl.
Web Statistics