[PHP-DB] Re: SQL or array ?

2005-04-24 Thread Paul Reilly
Okay, thanks all. I think what I'll do is save the data in a DB, and then read it in to an array when the script is first called. That way it doesn't need to perform the SQL query per mime_type hundreds of times, and can just key it from the array. How would I go about benchmarking the different

Re: [PHP-DB] SQL or array ?

2005-04-23 Thread Paul Reilly
> explain the phrase "big array." I guess everything is relative! We're talking about 300-500 items here. Paul -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] SQL or array ?

2005-04-23 Thread Paul Reilly
I have a quick question about which would the best way to implement something in terms of performance. Using a database, or just creating a big array in memory? I have a PHP file manager script which creates an array of all files in a directory, and get's their mime types. It then prints these fi