| От | Dr. Evil |
|---|---|
| Тема | Storing images in PG? |
| Дата | |
| Msg-id | 20010816060200.2212.qmail@sidereal.kz обсуждение |
| Ответы |
Re: Storing images in PG?
|
| Список | pgsql-general |
I am creating a DB which is going to have to store a lot of small
images. Nothing will be over 10k. This is with PG7.2. I have a few
questions: Should I use blob or bytea (neither seem to be well
documented), and how do I access that binary information? For
instance, if I have this table in PG:
CREATE TABLE imagetable (
....
image BYTEA,
....
);
and then I do this in PHP:
$result = pg_exec($db, "SELECT image FROM imagetable WHERE ...");
$ary = pg_fetch_array($result, 0);
$imagedata = $ary["image"];
Will all of the above work?
If I can handle images in the DB, this is going to be the coolest
wireless app.
Thanks
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера