Jump to content

Exporting files


Darkness Soul

Recommended Posts

Yo,

Well, this time, something new (to me)..

I was reading a file to export it to db, and the file have a textarea with some \n, \t, \n\t, \t\n, (...).
I want to write it in a blob in the db.. but.. its export wrong..

I've tried to use ltrim, rtrim, trim, but its only remove left and right .. not int the middle..

So, i've seen the preg_replace in the documentation, but ive never saw it before..

Someone help me?

Thanks

D.Soul
Link to comment
Share on other sites

I think I don't told that clear.. (mine bad english x] )

I have one DB in the server X, I have to read the data and write into the DB at server H.

So, I export it to a [data.txt] file, because I need to rewrite some data and turn it compatible with the new DB.

The "textarea" i've been said is just a BLOB in the old DB, but when i write it in the file, this write with that \n and \t characters.

I export the file, read and replace the adaptations, and import to new DB, in theory.

This old-blob give me a headshake with itself string.. I need to replace the \n for new lines to write and lost the \t (tabs), so I can write it into the new-blob..

Clean now? sorry for bad sentences.. ^^"!

D.Soul
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.