[FX.php List] First Mass email = Too Many Redirects for Safari

Steve Winter steve at bluecrocodile.co.nz
Wed Dec 19 11:03:02 MST 2007


Greetings Mr Schwartz...

For a similar process that I run, which imports large spreadsheets into
Filemaker (2500+ rows), which must be done through the web, I do a
combination of both the things that you are referring to...

I do things as batches, and use a for(each) loop... so when the user first
uploads the spreadsheet I extract the content and see how long it is... if
it's more than $maxRecords (a variable which I was able to define through
experimentation, which I eventually decided on 100 for) rows long, I process
the first 100 rows, set a session variable counter to 100, another to the
name of the spreadsheet, display a message to the user then use AJAX to
re-call the same page, which checks for the session variables, it finds
them, processes the next 100 rows, displays a message, and continues to
loop...

This gets round two issues which I predicted when I was first building the
page...
1. the page might timeout if there were too many records (had no idea about
the server that it was going to be running on, nor if I'd have any way to
edit php.ini on that server) ...
2. the user might wonder if anything was happening and try reloading the
page, thereby re-starting the whole process...

It has worked very well to date...

Just a couple of further thoughts to add to your mental-mixer

Cheers
Steve

(PS if anyone's interested in the code, let me know, happy to share ;-)


-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Jonathan Schwartz
Sent: 19 December 2007 17:40
To: alex at gandrpublishing.com; FX.php Discussion List
Subject: Re: [FX.php List] First Mass email = Too Many Redirects for Safari

At 10:53 AM -0600 12/19/07, Alex Gates wrote:
>I don't see why you'd want to do so many finds when you could just 
>get everything in one found set and foreach() through it.
>


I'm of that frame of mind now.

Thx

J
-- 
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-381-1852
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list




More information about the FX.php_List mailing list