faster way to get from SQL database into array
- From: Cleverbum@xxxxxxxxxxx
- Date: 11 Dec 2006 06:23:12 -0800
I currently have a list of md5 strings and need to check if a new
string is in that list hundreds of thousands of times. I've found that
the fastest way to do this is to have all the md5's stored in an array
and use the php function in_array().
my only problem now is that populating this array with data from my sql
server is rather slow, I currently use the lines:
$resone = mysql_query("SELECT * FROM logs_full");
mysql_close();
while ($row = mysql_fetch_array($resone)) {
$md5array[$md5count]= $row['textmd5'];
$md5count++;
}
to do this. does anyone have a faster method?
.
- Follow-Ups:
- Re: faster way to get from SQL database into array
- From: Norman Peelman
- Re: faster way to get from SQL database into array
- From: Norman Peelman
- Re: faster way to get from SQL database into array
- From: Erwin Moller
- Re: faster way to get from SQL database into array
- Prev by Date: Re: Sessions 2
- Next by Date: Re: [newbie] How to avoid FFox's "The page you are trying to view..."?
- Previous by thread: Redirect while carying form data
- Next by thread: Re: faster way to get from SQL database into array
- Index(es):