Обсуждение: byte and PHP

Поиск
Список
Период
Сортировка

byte and PHP

От
Martín Marqués
Дата:
I´m about to do some web aplications that will save data in a postgreSQL
database, but I have one problem: I don´t understand the way postgreSQL saves
byte files.

I heard about bytea and Large Objects. Are they the same?

And how do I insert, say, pdf files in my database?

I looked for examples, but didn´t find much (in PHP, obviously).

Saludos... :-)

--
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-----------------------------------------------------------------
Martín Marqués                  |        mmarques@unl.edu.ar
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------

Re: byte and PHP

От
"Brent R. Matzelle"
Дата:
You would use the oid PostgreSQL data type and use the PHP
pg_lo* commands (http://us.php.net/manual/en/ref.pgsql.php).
Here is a quick tutorial on how to import and export files:
http://www.newbienetwork.net/sections.php?op=printpage&artid=35

Brent

--- Mart�n Marqu�s <martin@bugs.unl.edu.ar> wrote:
> I�m about to do some web aplications that will save data in a
> postgreSQL
> database, but I have one problem: I don�t understand the way
> postgreSQL saves
> byte files.
>
> I heard about bytea and Large Objects. Are they the same?
>
> And how do I insert, say, pdf files in my database?
>
> I looked for examples, but didn�t find much (in PHP,
> obviously).
>
> Saludos... :-)
>
> --
> Porqu� usar una base de datos relacional cualquiera,
> si pod�s usar PostgreSQL?
>
-----------------------------------------------------------------
> Mart�n Marqu�s                  |        mmarques@unl.edu.ar
> Programador, Administrador, DBA |       Centro de Telematica
>                        Universidad Nacional
>                             del Litoral
>
-----------------------------------------------------------------
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com