From: Chris <dmagick@gmail.com>
To: ben wilko <wilko_ben@hotmail.com>
Cc: pgsql-php@postgresql.org
Subject: Re: Tutorial/Example of Insert/Select PDF Postgres DB ?
Date: Mon, 09 Oct 2006 15:51:46 +1000
Message-ID: <4529E372.8060708@gmail.com> (raw)
In-Reply-To: <BAY116-F265B137F1EBF903917D0048F160@phx.gbl>
References: <BAY116-F265B137F1EBF903917D0048F160@phx.gbl>
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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: dmagick@gmail.com, wilko_ben@hotmail.com
Subject: Re: Tutorial/Example of Insert/Select PDF Postgres DB ?
In-Reply-To: <4529E372.8060708@gmail.com>
References: <BAY116-F265B137F1EBF903917D0048F160@phx.gbl> <4529E372.8060708@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox