[Zope-DB] Photo Album
Chan YH
Chan YH" <cyhoong@pc.jaring.my
Mon, 27 Jan 2003 10:36:16 +0800
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C2C5EF.EBAF8740
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Dear Zopist
I need some help to build a photo album. Currently, I have Zope2.5.1 =
with zpsycopg1.0.13 connecting to Postgres7.2.1.
Could someone advise on the:
Postgres:
------------
my script is :
CREATE TABLE photo (
name char(40) not null,
date date,
photo bytea
);
Is the data type for photo - bytea correct?
DTML script
----------------
INSERT INTO photo=20
(name, date, photo)=20
where
(<dtml-sqlvar name type=3D"string">,
<dtml-sqlvar date type=3D"string">,
<dtml-sqlvar photo type=3D?>
);
What should the sqlvar type for inserting photograph?
I would appreciate some advice.
Thank you.
------=_NextPart_000_0007_01C2C5EF.EBAF8740
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Dear Zopist</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I need some help to build a photo =
album. =20
Currently, I have Zope2.5.1 with zpsycopg1.0.13 connecting to=20
Postgres7.2.1.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Could someone advise on =
the:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Postgres:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>my script is :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>CREATE TABLE photo (</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>name char(40) =
not=20
null,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>date =
date,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>photo bytea</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Is the data type for photo - =
bytea=20
correct?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>DTML script</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>----------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>INSERT INTO photo </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>(name, date, photo) </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>where</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>(<dtml-sqlvar name =
type=3D"string">,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> <dtml-sqlvar =
date =20
type=3D"string">,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> <dtml-sqlvar =
photo =20
type=3D?></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>What should the sqlvar type for =
inserting=20
photograph?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I would appreciate some =
advice.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank you.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0007_01C2C5EF.EBAF8740--