MySQL and base64_encoded content

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
apedcen
Forum Newbie
Posts: 1
Joined: Wed Aug 24, 2005 4:26 am

MySQL and base64_encoded content

Post by apedcen »

Hi,
I need to perform string search within mysql database content, which is encoded with base64. Search subject is not encoded, of course. In general, I have to select all of the content in the table, then decode every result with base64_decode and to perform search within decoded string.

Is somehow possible to do this without selecting all the records (table is huge) and to search within encoded strings?

Thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

options I see:
  1. transformt all the encoded strings back to natural form
  2. create a stored procedure/function/method that can perform the decode and search
  3. continue doing it the "old fashioned" way :)
Post Reply