> Date: Mon, 23 Feb 2009 22:30:14 +0800
> From: [email protected]
> To: [email protected]
> Subject: Re: [fw-general] Multiple placeholders in select()->where() clause?
> 
> On Mon, Feb 23, 2009 at 8:59 PM,  <[email protected]> wrote:
> > Hi all,
> >
> > I'm trying to accomplish the following with a Zend_Db_Table_Select
> > statement:
> >
> > $table->select()->where( 'SHA1( CONCAT( ?, ip ) ) = ?', array( $salt, $data[
> > 'ip' ] ) );
> >
> > In other words, I am trying to get a where clause to accept multiple
> > placeholder values. Is something like this possible? If not, any other
> > (sleek) suggestions? Thanks in advance!
> >
> > FireEyed
> >
> > ________________________________
> > Meer dan chatten alleen. Check nu de nieuwe Windows Live
> 
> Though my problem is not exactly yours, what I did was I created a
> WHERE caluse in a variable and then passed it to select.
> 
> ==============
> $whereclause = "SHA1(CONCAT(" . $salt . "," . "ip)) = " . $data['ip'] ;
> 
> $table-$select->where($whereclause);
> =============
> 
> don't know if it is helpful
> 
> have  a look at my previous post
> http://www.nabble.com/Multiple-pattern-match-with-Zend_Db_Table_Select-td22134565.html
> 
> regards!
> 
> -- 
> =======================
> Registered Linux User #460714
> Currently Using Fedora 8, 10
> =======================

Hey thanks for the response.

I'm afraid that is not entirely what I'm after. I need to quote the values 
against possible SQL injection. I could do this with quoteInto() or something 
similar, but I am hoping for a more sleek option.

Cheers

_________________________________________________________________
Nieuw: nu ook chatten op je mobiel!
http://www.overaljevriendenbijje.nl/#superdeal

Reply via email to