Re: [PHP] download queue

2003-09-30 Thread Marek Kilimajer
0, 2003 6:32 AM Subject: Re: [PHP] download queue I would do it this way. Output your files and update bandwith usage: while($out=fread($file, 4096)) { echo $out; UPDATE bandwith_usage SET bandwith_usage = bandwith_usage+1 WHERE second = UNIX_TIMESTAMP() LIMIT 1 if(mysql_aff

Re: [PHP] download queue

2003-09-30 Thread Marek Kilimajer
I would do it this way. Output your files and update bandwith usage: while($out=fread($file, 4096)) { echo $out; UPDATE bandwith_usage SET bandwith_usage = bandwith_usage+1 WHERE second = UNIX_TIMESTAMP() LIMIT 1 if(mysql_affected_rows()==0) { // if this is the first output in this second I