A
A
Andrey2016-09-17 07:25:17
PHP
Andrey, 2016-09-17 07:25:17

How to pull Base64 from Postgresql with minimal effort?

The essence of the task is as follows: there is a Postgresql base with records in the form of base64.
The data is pulled to the site written in php. What options are there to extract this data in order to get the data in decoded form on the site?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
protven, 2016-09-17
@protven

You want that decoding directly at the DB level was carried out?
Then look towards https://www.postgresql.org/docs/current/static/fun...

select encode(data::bytea, 'base64') 
from table;

Somehow, in theory

A
Alexander Aksentiev, 2016-09-17
@Sanasol

What is the question?
php.net/manual/en/function.base64-decode.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question