pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Glaesemann <grzm@myrealbox.com>
To: pgsql-php@postgresql.org
Subject: Re: Saving result to file for download
Date: Tue, 28 Oct 2003 09:01:55 +0900
Message-ID: <F136D279-08D9-11D8-9192-0005029FC1A7@myrealbox.com> (raw)
In-Reply-To: <200310272056.28937.skoot@qi.pl>

Hi M.P.

On Tuesday, Oct 28, 2003, at 04:56 Asia/Tokyo, Mariusz Pekala wrote:
>
> Why have you decided to store results in a file? Is that file to be 
> really
> big? or takes long to prepare?

Actually the file is pretty small (less than 8K) and is pretty quick to 
make (less than 2 seconds). I just didn't know how to do it any other 
way.

> Maybe generating the file 'on the fly' would be easier:
>
> 1) Provide a link to a script that generates the file
> (eg: <a href="file.php?type=whatever">get file here</a>
>
> 2) The script "file.php" sets the content type header to text/plain 
> and just
> outputs the result of a query. I am not sure how to set HTTP header on 
> Your
> webserver (with apache there is a PHP function header(string) )

This sounds like *exactly* what I am after. I'll give it a try!

Thanks for taking the time to respond. I knew there should be a better 
way but didn't know where to even start looking. I really appreciate 
your help.

Michael




view thread (5+ messages)  latest in thread

Message-ID: <F136D279-08D9-11D8-9192-0005029FC1A7@myrealbox.com>
Permalink:  ../F136D279-08D9-11D8-9192-0005029FC1A7@myrealbox.com/
Also on:    postgresql.org/message-id/F136D279-08D9-11D8-9192-0005029FC1A7@myrealbox.com

 · 

reply

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: grzm@myrealbox.com
  Subject: Re: Saving result to file for download
  In-Reply-To: <F136D279-08D9-11D8-9192-0005029FC1A7@myrealbox.com>
  References: <200310272056.28937.skoot@qi.pl> <F136D279-08D9-11D8-9192-0005029FC1A7@myrealbox.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