[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] Double MySQL query thru DBI.




On 12/7/05 10:57 AM, "Strong" <suppressed> wrote:

> I want to ask for technology on retriving from a table two values in
> single request. Say, I can do (MySQL query):
> select id where name="q";
> And through DBI on say $row[0] have the id. But! How to in single
> request if I want to retrive 2 ids: for name="q" and for name="w"?
> It is a great optimization thing if I in this simple query will reduce
> DB-requests by 2. Thank You.

Select id from table where name in ('q','w');

Sean



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.