PHP Storing compressed data in mssql image field

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

    PHP Storing compressed data in mssql image field

    Hello all,

    I am trying to store a large string representing a RTF document through PHP
    in a MS SQL Server database. To gain diskspace i want to compress that
    string.

    My code looks like this:

    str_replace("'" ,"''",addslashe s(gzcompress($R TF1)))

    The insert succeeds but the problem occurs when i try to retrieve the data
    form the database and when i try to transform it to the original string, i
    then use:

    $RTFdecompresse d = gzuncompress(st ripslashes(str_ replace("''","' ",$RTF)));

    But this does not work ok....

    Can someone have any suggestions please?

    Marcel



Working...