Hi,
If the values to be matched against were from a table, why can't subquery be
used.
Like, SELECT * FROM TABLE1 WHERE id IN (select id from table2);
Otherwise if numeric constants, then AFAIK procedure -loops would do.
Thanks
ViSolve DB Team.
----- Original Message -----
From: "VenuGopal Papasani" <[EMAIL PROTECTED]>
To: "ViSolve DB Team" <[EMAIL PROTECTED]>
Cc: <mysql@lists.mysql.com>; "bharath kumar" <[EMAIL PROTECTED]>
Sent: Saturday, January 06, 2007 2:52 PM
Subject: Re: How to access an array variables in a single query
but that is not static for 3 variables what if array contains 1000
elements
in cannot be used in such cases
Thanks and Regards,
venu
On 1/6/07, ViSolve DB Team <[EMAIL PROTECTED]> wrote:
Hi,
IN operator will do.
For Instance.
SELECT * FROM TABLE1 WHERE id IN ('i1','i2','i3');
Thanks
ViSolve DB Team.
----- Original Message -----
From: "VenuGopal Papasani" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Cc: "bharath kumar" <[EMAIL PROTECTED]>
Sent: Saturday, January 06, 2007 2:07 PM
Subject: How to access an array variables in a single query
> Dear all,
> I have got an array variable say a[]={"i1","i2",i3""} now i need to
get
> the values from the database that matches i1,i2,i3 for example
>
> select * from tablename where i1=a[1] and
> simillaryly to a[2] and a[3] but my list is too big one more option i
can
> write it through loop but it takes time.Is there any possibility of
> writing
> a single query to retrieve all that data.
>
> Awaiting your reply
>
> Thanks and Regards,
> venu
>
> --
> ధన్యవాదములతో,
> వేణుగోపాల్ పాపసాని.
>
--
ధన్యవాదములతో,
వేణుగోపాల్ పాపసాని.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]