Re: Tutorial/Example of Insert/Select PDF Postgres DB ?

Поиск
Список
Период
Сортировка
От Chris
Тема Re: Tutorial/Example of Insert/Select PDF Postgres DB ?
Дата
Msg-id 4529E372.8060708@gmail.com
обсуждение исходный текст
Ответ на Tutorial/Example of Insert/Select PDF Postgres DB ?  ("ben wilko" <wilko_ben@hotmail.com>)
Ответы Re: Tutorial/Example of Insert/Select PDF Postgres DB ?  ("ben wilko" <wilko_ben@hotmail.com>)
Список pgsql-php
Firstly always CC the mailing list.

ben wilko wrote:
> I am looking to have a dynamic page which will allow users to select
> categories in which a corresponding PDF file will be accessible to them.

That doesn't make any difference.. It becomes two database tables:

create table downloadfile (fileid serial primary key, filename text);
create table downloadfile_categories (fileid int references downloadfile
(fileid), categoryid int references categories (categoryid));

then a file can be available for multiple categories and so on.


If you really want to store binary data in the database, start here:

http://www.postgresql.org/docs/8.1/static/datatype-binary.html

and here:

http://php.net/pg_escape_bytea

--
Postgresql & php tutorials
http://www.designmagick.com/

В списке pgsql-php по дате отправления:

Предыдущее
От: Chris
Дата:
Сообщение: Re: Tutorial/Example of Insert/Select PDF Postgres DB ?
Следующее
От: "Cyprian Makhafola [ MTN - Innovation Centre ]"
Дата:
Сообщение: Search an addresbook