Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

newbie: report writing, any good books?

0 views
Skip to first unread message

shortbac...@hairdresser.net

unread,
Oct 8, 2009, 4:06:59 PM10/8/09
to
I'm getting my head round most of the basics but struggling a bit with
reports.

Got a couple of books but can't find anything that focusses on report
formatting - any suggestions?

Specifically I'd like to do something like

Division1: total games, total won, total lost, total draws
League 1: total games, total won, total lost, total draws
team1A: games,won,lost, drawn
team1B: games,won,lost, drawn
League 2: total games, total won, total lost, total draws
team2A: games,won,lost, drawn
team2B: games,won,lost, drawn

But so far I've only been able to find out how to do something more
like:
team1A: games,won,lost, drawn
team1B: games,won,lost, drawn
League 1: total games, total won, total lost, total draws

Or am I getting too ambitous too soon?

Captain Paralytic

unread,
Oct 9, 2009, 8:18:59 AM10/9/09
to

Dunno, what are you using to format your reports?

shortbac...@hairdresser.net

unread,
Oct 10, 2009, 3:49:38 AM10/10/09
to

PHP
I was thinking there might be some kind of complex query that would
deliver the team detail lines and the division/league totals but I
guess the approach is to do several queries storing the results in
variables then use those to construct the html output.
I'm surprised that I've not been able to find any PHP reference
material that addresses anything other than very basic report
formatting. Anyway, it's begiinning to sound like I'm in the wrong
NG, my question has become more of a PHP one than mysql.

The Natural Philosopher

unread,
Oct 10, 2009, 5:40:35 AM10/10/09
to

No, you are in the right place, or half in the right place.

To optimise sql time, you need to at least try to encapsulate everything
in as few queries as possible. I haven't looked into your exact problem,
but it looks like a series of join statements would produce a single
outpout table type data structure with all you need.


Thats the SQL part.

Formatting the query for web use if that is what you want, is the PHP part.

Personally I have done similar, using a home made library of tabulation
type commands, for the web displays, and using te PDFlite library to
generate PDF files for 'hard copy'.

None of this is instant magic.

Captain Paralytic

unread,
Oct 10, 2009, 7:11:10 AM10/10/09
to

You haven't shown what you are doing to get the results that you
showed in the OP, but the WITH ROLLUP modifier could help you along:
http://dev.mysql.com/doc/refman/5.0/en/group-by-modifiers.html

publi...@sheffield.port995.com

unread,
Oct 10, 2009, 8:01:45 AM10/10/09
to
On Sat, 10 Oct 2009 10:40:35 +0100, The Natural Philosopher
<t...@invalid.invalid> wrote:

>shortbac...@hairdresser.net wrote:
>> On Fri, 9 Oct 2009 05:18:59 -0700 (PDT),

Thanks guys (Captain Paralytic and The Natural Philosopher)

That's all good stuff, just the kind of directional guidance I needed,
hopefully I'm now heading in the right direction !

0 new messages