Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 166409FA61D for ; Sat, 14 Oct 2006 01:58:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 04403-08 for ; Sat, 14 Oct 2006 04:58:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from bay0-omc2-s14.bay0.hotmail.com (bay0-omc2-s14.bay0.hotmail.com [65.54.246.150]) by postgresql.org (Postfix) with ESMTP id E45829FA196 for ; Sat, 14 Oct 2006 01:58:00 -0300 (ADT) Received: from hotmail.com ([64.4.38.18]) by bay0-omc2-s14.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 13 Oct 2006 21:57:59 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 13 Oct 2006 21:57:59 -0700 Message-ID: Received: from 64.4.38.200 by by116fd.bay116.hotmail.msn.com with HTTP; Sat, 14 Oct 2006 04:57:54 GMT X-Originating-IP: [60.231.26.246] X-Originating-Email: [wilko_ben@hotmail.com] X-Sender: wilko_ben@hotmail.com In-Reply-To: <4529E372.8060708@gmail.com> From: "ben wilko" To: dmagick@gmail.com Cc: pgsql-php@postgresql.org Subject: Re: Tutorial/Example of Insert/Select PDF Postgres DB ? Date: Sat, 14 Oct 2006 14:57:54 +1000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 14 Oct 2006 04:57:59.0779 (UTC) FILETIME=[523B8330:01C6EF4D] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.907 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, MSGID_FROM_MTA_HEADER, SPF_PASS X-Spam-Level: * X-Archive-Number: 200610/13 X-Sequence-Number: 3613 thank you chris for your solution :) >From: Chris >To: ben wilko >CC: pgsql-php@postgresql.org >Subject: Re: [PHP] Tutorial/Example of Insert/Select PDF Postgres DB ? >Date: Mon, 09 Oct 2006 15:51:46 +1000 > >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/ > >---------------------------(end of broadcast)--------------------------- >TIP 2: Don't 'kill -9' the postmaster