Re: [Zope] Double quote in ZSQL Method

2006-02-21 Thread Chris Withers

Andrew Milton wrote:

| In a ZSQL Method, I have tablename.dtml-sqlvar species type=string
| and I get tablename.'species_value', what I need is
| tablename.species_value.  Any idea how I can get Zope/ZSQL to not
| put in the single quotes (or use double quotes)?
| 


tablename.dtml-var species

Don't use sqlvar except for things you want quoted.. use dtml-var


Surely with this he won't get _any_ quotes? The guy's after double 
quotes for some unfathomable reason ;-)


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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] Double quote in ZSQL Method

2006-02-21 Thread Andrew Milton
+---[ Chris Withers ]--
| Andrew Milton wrote:
| | In a ZSQL Method, I have tablename.dtml-sqlvar species type=string
| | and I get tablename.'species_value', what I need is
| | tablename.species_value.  Any idea how I can get Zope/ZSQL to not
| | put in the single quotes (or use double quotes)?
| | 
| 
| tablename.dtml-var species
| 
| Don't use sqlvar except for things you want quoted.. use dtml-var
| 
| Surely with this he won't get _any_ quotes? The guy's after double 
| quotes for some unfathomable reason ;-)

Well he said no quotes OR double quotes

I didn't think I'd need the sock puppets for him to work out how to get the
double quotes d8)

-- 
Andrew Milton
[EMAIL PROTECTED]
___
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] Double quote in ZSQL Method

2006-02-21 Thread Jaroslav Lukesh
 Jason C. Leach
 In a ZSQL Method, I have tablename.dtml-sqlvar species type=string
 and I get tablename.'species_value', what I need is
 tablename.species_value.  Any idea how I can get Zope/ZSQL to not
 put in the single quotes (or use double quotes)?

dtml-var species sql_quote

JL.

___
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] Double quote in ZSQL Method

2006-02-20 Thread jpenny
tablename.dtml-var species sql_quote
should work.  Be sure that you check that species is valid
before this call.  sql_quote should protect you from SQL injection,
but it is better to be safe.

jim



[EMAIL PROTECTED] wrote on 02/20/2006 05:46:49 PM:

 Hi,
 
 In a ZSQL Method, I have tablename.dtml-sqlvar species type=string
 and I get tablename.'species_value', what I need is
 tablename.species_value.  Any idea how I can get Zope/ZSQL to not
 put in the single quotes (or use double quotes)?
 
 Thanks,
 Jason.
 
 --
 
  Jason C. Leach
  PGP Key: 0x62DDDF75
  Keyserver: gpg.mit.edu
 ___
 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] Double quote in ZSQL Method

2006-02-20 Thread Andrew Milton
+---[ Jason C. Leach ]--
| Hi,
| 
| In a ZSQL Method, I have tablename.dtml-sqlvar species type=string
| and I get tablename.'species_value', what I need is
| tablename.species_value.  Any idea how I can get Zope/ZSQL to not
| put in the single quotes (or use double quotes)?
| 

tablename.dtml-var species

Don't use sqlvar except for things you want quoted.. use dtml-var

-- 
Andrew Milton
[EMAIL PROTECTED]
___
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 )