Results 1 to 5 of 5

Thread: compressed text and mysql

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Location
    Osaka
    Posts
    200

    compressed text and mysql

    I want to store compressed text using gzcompress into mysql field where fieldtype is text.

    But i get error..
    This error vanishes when i use plain text.

    Error is to check manual.....

    Question is how to store compressed data in mysql ?

    Thank You.

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: compressed text and mysql

    what error message are you getting? Have you added slashes to the compressed value?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Location
    Osaka
    Posts
    200

    Re: compressed text and mysql

    Error i get is

    You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'cUÓyM›û]YûßTS§mÖø_öè|®SÝT?½¥®Ê!y{ëVùÊP†’Â1�'‰;(§�èh$1Cà�b
    But when i use plain text (non-compressed) then there is no error at all and all things go fine.


    Why to add slashes ?

    I am just using gzcompress($string,9) and return value is tried to store.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Location
    Osaka
    Posts
    200

    Re: compressed text and mysql

    Okay thank you john

    addslashes function has solved the problem

    Thanks for your help

    John,visualAd,pengate

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: compressed text and mysql

    I don't even need to post anymore

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width