Re: [Zope] msSql and python

2005-11-11 Thread Bertrand Croq

Floyd May a écrit :


You can do it like this (inside the query):
--8<

WHERE description = 

--8<
 


Or like this:



 



--
Bertrand Croq - FreesKop - Avenue Robert Schuman - 35170 BRUZ
http://www.freeskop.com/ - Tel: 02 99 05 04 56 - Fax: 02 99 05 96 40

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] msSql and python

2005-11-10 Thread Kate Legere
That was it exactly - I didn't have the right python syntax but had thought
the mistake was in the zsql.

Thanks!

Kate

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Floyd May
Sent: Thursday, November 10, 2005 12:04 PM
To: Zope
Subject: Re: [Zope] msSql and python

You can pass arguments to ZSQL Methods.  In this particular case, I
assume that you don't want the WHERE clause in the query if the
'description' parameter is not passed?

You can do it like this (inside the query):
--8<

WHERE description = 

--8<

Then, inside your python script:
--8<
desc = 'some string'
context.path.to.query.queryname(description=desc)
--8<

Hope that helps!

fm

On 11/10/05, Kate Legere <[EMAIL PROTECTED]> wrote:
> I have a zsql method to which I want to pass and argument. Normally I do
it
> from a dtml method and the use something like this to test for equality.
>
> WHERE  description = .
>
> However, I'm passing the variable from a python script and it won't accept
> the dtml tag what do I put in the equality test?
>
>
>
>
> Kate
>
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] msSql and python

2005-11-10 Thread Floyd May
You can pass arguments to ZSQL Methods.  In this particular case, I
assume that you don't want the WHERE clause in the query if the
'description' parameter is not passed?

You can do it like this (inside the query):
--8<

WHERE description = 

--8<

Then, inside your python script:
--8<
desc = 'some string'
context.path.to.query.queryname(description=desc)
--8<

Hope that helps!

fm

On 11/10/05, Kate Legere <[EMAIL PROTECTED]> wrote:
> I have a zsql method to which I want to pass and argument. Normally I do it
> from a dtml method and the use something like this to test for equality.
>
> WHERE  description = .
>
> However, I'm passing the variable from a python script and it won't accept
> the dtml tag what do I put in the equality test?
>
>
>
>
> Kate
>
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )