pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
upload a image file and save into the table
3+ messages / 3 participants
[nested] [flat]

* upload a image file and save into the table
@ 2002-09-19 04:34  Zhidian Du <duzhidian@hotmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Zhidian Du @ 2002-09-19 04:34 UTC (permalink / raw)
  To: pgsql-php

Hello:


I want to let users  upload a image file (jpg or gif or any binary file) 
from browser and save these files into one column of a table, how can i 
implement it ?

Thanks in advance.

Zhidian Du


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: upload a image file and save into the table
@ 2002-09-19 04:42  Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  parent: Zhidian Du <duzhidian@hotmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Christopher Kings-Lynne @ 2002-09-19 04:42 UTC (permalink / raw)
  To: Zhidian Du <duzhidian@hotmail.com>; pgsql-php

> I want to let users  upload a image file (jpg or gif or any binary file)
> from browser and save these files into one column of a table, how can i
> implement it ?

Use the 'bytea' column type.  You must properly escape the binary data
before inserting it tho. There are functions in PHP's postgres module to do
this.

Chris




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: upload a image file and save into the table
@ 2002-09-19 04:46  Joe Conway <mail@joeconway.com>
  parent: Zhidian Du <duzhidian@hotmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Joe Conway @ 2002-09-19 04:46 UTC (permalink / raw)
  To: Zhidian Du <duzhidian@hotmail.com>; +Cc: pgsql-php

Zhidian Du wrote:
> I want to let users  upload a image file (jpg or gif or any binary file) 
> from browser and save these files into one column of a table, how can i 
> implement it ?
> 

Please search the archives. There have been multiple discussions about this in 
the past. Here's a link to one thread:

http://archives.postgresql.org/pgsql-general/2002-02/msg01140.php

Joe




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-09-19 04:46 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-19 04:34 upload a image file and save into the table Zhidian Du <duzhidian@hotmail.com>
2002-09-19 04:42 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2002-09-19 04:46 ` Joe Conway <mail@joeconway.com>

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