[Zope] run raw sql
Andreas Jung
lists at zopyx.com
Tue Jul 27 12:38:22 EDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Garry Saddington wrote:
> Is there any way to run raw sql statements from within a python script?
> Any help at all much appreciated.
Free out of my head:
- - write a ZSQL method "genericSQL.sql" containing something like
<dtml-var query>
- - call the method from Python using acquisition:
context.genericSQL(query='drop table XXXX')
The risk regarding SQL injection etc. is at you.
- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxPC34ACgkQCJIWIbr9KYwu7gCfWThum4zjekhRnGJCg1T32OmS
eTQAn1BY/kPulI8mGP0+s/7gGZl/MshR
=nFgz
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20100727/b4f25497/attachment.vcf
More information about the Zope
mailing list