Edit phpmyadmin blob field

Yes.

In the same vein as Viewing the contents of a blob. In phpMyAdmin , I have a blob.

And just like in the screenshot of this URL, it says "blob". Thank phpmyadmin You are the best!

Unlike the guy who asked the above question, I really want to change the blob values ​​and then save them. So, if my blob has, as its text, "ima blob yo" - and I can see this text thanks to the solution above - how can I change this to "I am blob, you".

I don’t particularly want to upload a text file every time I edit blob, it is totes bogue. Just want to edit it, since I would have a text box.

Hooray!

+4
source share
2 answers

Oh. phpmyadmin website, there is this page: http://www.phpmyadmin.net/documentation/#faq1_31

$cfg['ProtectBinary'] boolean or string Defines whether BLOB or BINARY columns are protected from editing when browsing a table content. Valid values are: * FALSE to allow editing of all columns; * 'blob' to allow editing of all columns except BLOBS; * 'all' to disallow editing of all BINARY or BLOB columns. 

Ok, so the details are how to let me edit my drops.

I made a change

 $cfg['ProtectBinary'] = FALSE; $cfg['ShowBlob'] = TRUE; 

and put these two as the last lines in my config.inc.php file, which, since I use UBUNTU and used auto install sudo apt-get install phpmyadmin , was in /etc/phpmyadmin/

And it worked, curious. Now I can edit my blobs ... with the restriction that phpmyadmin displays the current blob content in a "blob-view", which is a whole bunch of numbers or some nonsense.

A simple solution I found:

  • write the text. Simple editing is actually not an option, but, fortunately, I did not need to edit, just add new data.
  • change the parameter "function" ... I can’t remember what it was, but it was something crazy ... just "empty". The same type of empty as the function parameter, by default for other values ​​- ints, etc.

amuses Andrew

PS what

 $cfg['ShowBlob'] = TRUE; 

was from the given url in the question I'm attached to. The poster claims that it is not effective in phpmyadmin, but I only load it with the latest sudo-get a few months ago, so it still works. In fact, I needed to enable this value to make editing work.

+3
source

If your BLOB field is really just text, you might consider converting your BLOB field to a TEXT field (there should be no data loss in the process). TEXT fields are available for viewing / editing directly from phpMyAdmin.

+2
source

Source: https://habr.com/ru/post/1397155/


All Articles