Thats not a bad idea...
You are right about why I chose CSV... it serves its purpose and doesn't
require excel...
I do not support M$ when I don't have to for work.
with the queries, I take it you mean something like this:
# in runmode:
my $query = debt_details($session_user_client);
# sub somewhere.
sub debt_details
{
my $session_user_client = shift;
my $query = qq{
SELECT
debt.debt_id, debt.deb_client_reference
FROM
debt
WHERE
debt.deb_client_id = '$session_user_client'
ORDER BY
debt.deb_client_reference
DESC
};
return $query;
}
Is that the sort of thing you were proposing????
So the name of the sub could be passed to the csv creating runmode in the
session file or form data to produce the correct csv?????
Incidenly, I have never used GGI.pm to start a download (never sent a
download header actually).. and particularly never from CGI::App, is it
fiddly or is there a better way???
rgds
Frank
-----Original Message-----
From: Mark Stosberg [mailto:suppressed
Sent: Wednesday, 12 February 2003 3:36 AM
To: Franki
Cc: suppressed
Subject: Re: [cgiapp] creating a .csv file...
> It displays fairly large chunks of data from a mysql db. (sometimes up to
> 1500 lines of data.)
>
> Anyway, I now have a small problem and I was wondering if you guys had a
> suggestion...
Frank,
Part of your solution could be to have your data gathering routines
seperated from your display routines. This way, run modes to "view data
as HTML" and "view data as CSV" could share the same data handling.
Then you might also have one routine that transforms a database data
structure into CSV format. (likewise for HTML format). Then you should
have fairly small run modes to do the actual HTML and CVS display.
I like the idea of using CSV instead of Excel format simply in the
spirit of avoiding supporting Microsoft whenever possible. :)
Mark
--
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Mark Stosberg Principal Developer
suppressed Summersault, LLC
765-939-9301 ext 202 database driven websites
. . . . . http://www.summersault.com/ . . . . . . . .
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.