Alpha Video Training
Results 1 to 4 of 4

Thread: Search into MySQL blob fields

  1. #1
    Member
    Real Name
    Dragan Milosavljevic
    Join Date
    Mar 2010
    Location
    Belgrade, Serbia
    Posts
    79

    Default Search into MySQL blob fields

    Hi everyone,

    I'm trying to create a file management system.

    I made a form with which it can import any file (PDF, XLS or DOC) in MySQL table as a BLOB data type. Also, at any time from MySQL tables can recreated the same file.
    And it works phenomenally accurate and fast.

    I would like to add file search.
    Suppose you looking for a specific term but do not know in which file is located as well as what type of file it is in.

    So I should create a store procedure in MySQL that would return a list of record keys of files that match the specified criteria.
    Has anyone done this and if anyone knows if it is possible due to a different file type which are stored in the BLOB field of MySQL table.

    Image1.jpg

  2. #2
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,649

    Default Re: Search into MySQL blob fields

    If you can do it as a S.P., that would be the way to do it. Can't even think of an alternative method.

  3. #3
    Member
    Real Name
    Dragan Milosavljevic
    Join Date
    Mar 2010
    Location
    Belgrade, Serbia
    Posts
    79

    Default Re: Search into MySQL blob fields

    Thanks Peter,

    I guess it is not possible to search directly transfer files in blob. Because each file type has its own way of encoding, and then searches the SP is not possible.
    Maybe adding a another blob field in MySQL table that chipped txt versions of files. This makes it complicated to me but maybe the only solution.
    So that one blob field serves to re-generate the file from the table and the other blob field to search for the file.

    In this case, we would then need some 'command line' converter doc_to_txt, xls_to_txt, pdf_to_txt ...

  4. #4
    Member
    Real Name
    Dragan Milosavljevic
    Join Date
    Mar 2010
    Location
    Belgrade, Serbia
    Posts
    79

    Default Re: Search into MySQL blob fields

    So, searches per blob field in who are accommodated files of different extensions and still think it's not possible.
    The workaround for me was to introduce another blob field in which I will accommodate converted version (pdf, xls, doc ...) files in txt format.
    Such a blob data is searchable with store procedure and it works great.

    So 2 blob fields, one contains an original version of the file and in the other one is txt version of doc, xls, pdf file.

Similar Threads

  1. How to add a Blob Image from a MYSQL Database to a PDF Report - so simple!!
    By ssmoore1 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 11
    Last Post: 11-29-2016, 10:54 PM
  2. Search Part of Grid - How to Search Two Fields using one search field and MySQL
    By cpgood in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 07-21-2013, 05:08 PM
  3. mySQL BLOB image in Grid kills row save
    By chopfner in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 01-07-2011, 06:47 PM
  4. new fields & blob
    By Trixie dela Cena in forum Alpha Five Version 5
    Replies: 14
    Last Post: 04-01-2004, 08:30 AM

Bookmarks

Posting Permissions

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