You are here: Re: return multiple rows from sql statement « PHP Programming Language « IT news, forums, messages
Re: return multiple rows from sql statement

Posted by Rik Wasmus on 09/01/07 03:00

On Wed, 29 Aug 2007 19:04:31 +0200, Jerry Stuckle
<jstucklex@attglobal.net> wrote:

> giloosh wrote:
>> On Aug 29, 12:20 pm, Jan Thomä <k...@insomnia-hq.de> wrote:
>>> giloosh wrote:
>>>> Would i just loop through the rows that were checked and add them to
>> Thanks Jan.
>> I will do a few SQL tests to see which method is faster.
>>>> the WHERE STATEMENT using the OR condition?
>>>> select * from rows where id = 3 or id = 2 or id = 6 or id = 10
>>> You could try the IN variant like:
>>>
>>> select * from rows where id in ( ?, ?, ?, ?);
>>>
>>> This might be a bit faster than the ORs...
>>>
>>> Best regards,
>>> Jan
>
> You could even ask in a SQL group, since this isn't a PHP question.

Allthough the advice make sense :)
--
Rik Wasmus

My new ISP's newsserver sucks. Anyone recommend a good one? Paying for
quality is certainly an option.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация