BLOB handling with length-specified table definition

Issue #342 resolved
charno created an issue


I am working on a database where I store GUIDs which I use as primary keys as BLOBs. For this, I did specify the columns as BLOB(16) to specify the length of the field (I know that this has no effect in SQLite, but I auto-generate the database script from MySQL Workbench, and it makes sense to see it in the ERM). For this column, phpliteadmin does not show the download/upload options I would expect and also get if I define the column as BLOB.

Also, another question: BLOB handling is currently implemented in a way that it makes sense if files are stored in the database. Would it be simple to add the possibility to handle the data as hex-strings? For GUIDs this makes much more sense instead of downloading and uploading 16-byte-files. This could be for example a config-option.

Thank you for your work!

Comments (10)

  1. phpLiteAdmin repo owner

    Oh, sorry. your main concerns are

    • BLOB works, but BLOB(16) does not
    • Hex-Option for BLObs

    I got it, sorry.

  2. charno reporter


    Thank you for your answer. I am already using the development version. This works if the Column is specified as (precisely) "BLOB", but not when specified as "BLOB(16)". This is one part of my request.

    The second part would be if it's possible to implement a direct editing of (small) BLOBs in the webinterface, for example in a hex-encoded textfield.

    Thank you Christof

  3. phpLiteAdmin repo owner

    With commit 58ba700, phpLiteAdmin now treats every column with a type name starting with "BLOB" as a BLOB field, so BLOB(16) now works the same as BLOB. This should solve your first point. Please check the development version to let me know if it suits your needs in this regard.

  4. charno reporter

    Thank you very much. This commit perfectly solves my first point.

    If you give me some hints where I have to look, I could try to implement the Hex-Option. I would need to know where the display and the edit-parts for the field type are (I think).

  5. charno reporter

    Okay, I had a look without the pointers, and found the parts where I had to make changes (mostly searching for "BLOB" ;-)). I have created a pull request #5, please have a look at it and accept it if you are interested in the functionality.

  6. Log in to comment