Re: Most efficient way of fetching 1,000 records from MySQL ?

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

 



> > I think you'll find that your first approach is not only more correct,
> > it's the only manageable one.
>
> No, it will be very slow. The biggest overhead is in transfering data to
> and from sql server. It's always better to get the results in one sql
query.
>
> Use this aproach:
>
> $users =
> sql('select * from users where userID IN ('. implode(', ',$users) .')');

That is precisely what I wanted, many thanks for your help guys.

Steve

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux