That's a much better answer than mine!
Take this advice! ;)
CheersSergey Konoplev ---20/07/2012 08:29:18---On Fri, Jul 20, 2012 at 6:33 AM, Madhu.Lanka <[email protected]> wrote: > I am getting the fol
From: Sergey Konoplev <[email protected]>
To: [email protected],
Cc: [email protected]
Date: 20/07/2012 08:29
Subject: Re: [ADMIN] ERROR: there is no parameter $1
Sent by: [email protected]
On Fri, Jul 20, 2012 at 6:33 AM, Madhu.Lanka <[email protected]> wrote:
> I am getting the following error
>
> ERROR: there is no parameter $1
> LINE 5: r.role_id = u.role_id and p.name= $1 and p.password = $2
Because they are not expanding inside strings. Use EXECUTE ... USING ...
EXECUTE '... and p.name =$1 and p.password = $2;' USING pname, ppassword
--
Sergey Konoplev
a database architect, software developer at PostgreSQL-Consulting.com
http://www.postgresql-consulting.com
Jabber: [email protected] Skype: gray-hemp Phone: +79160686204
--
Sent via pgsql-admin mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
============================================= Romax Technology Limited Rutherford House Nottingham Science & Technology Park Nottingham, NG7 2PZ England Telephone numbers: +44 (0)115 951 88 00 (main) For other office locations see: http://www.romaxtech.com/Contact ================================= =============== E-mail: [email protected] Website: www.romaxtech.com ================================= ================ Confidentiality Statement This transmission is for the addressee only and contains information that is confidential and privileged. Unless you are the named addressee, or authorised to receive it on behalf of the addressee you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please delete from your system and contact the sender. Thank you for your cooperation. =================================================
<<inline: graycol.gif>>
