By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,871 Members | 2,418 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,871 IT Pros & Developers. It's quick & easy.

Crosstab Report

P: n/a
Hi All,

Any guidance on how to generate a crosstab report, have searched everwhere,
well almost, no joy.

Any help gratefuly accepted

Cheers

May 30 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Johnny BeGood wrote:
Any guidance on how to generate a crosstab report, have searched everwhere,
well almost, no joy.
Do you mean on how to join two tables together?

SELECT *
FROM people p
INNER JOIN companies c ON p.employer=c.company_id
WHERE c.country='de' AND p.forename='Hans';

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 95 days, 18:35.]

Non-Intuitive Surnames
http://tobyinkster.co.uk/blog/2007/0...tive-surnames/
May 30 '07 #2

P: n/a
Hi Toby,

Thanks for your reply, some thing like the following, noy sure how this will
format

Engineer Day1 Day2 Day3
John esb n/w esb
Mary n/w esb abc

almost like a spreadsheet ;)

Cheers
"Toby A Inkster" <us**********@tobyinkster.co.ukwrote in message
news:7k************@ophelia.g5n.co.uk...
Johnny BeGood wrote:
>Any guidance on how to generate a crosstab report, have searched
everwhere,
well almost, no joy.

Do you mean on how to join two tables together?

SELECT *
FROM people p
INNER JOIN companies c ON p.employer=c.company_id
WHERE c.country='de' AND p.forename='Hans';

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 95 days, 18:35.]

Non-Intuitive Surnames
http://tobyinkster.co.uk/blog/2007/0...tive-surnames/
May 30 '07 #3

P: n/a
Johnny BeGood wrote:
almost like a spreadsheet ;)
Use the HTML <tableelement.

I'm still not entirely sure what the question is.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 95 days, 20:12.]

Non-Intuitive Surnames
http://tobyinkster.co.uk/blog/2007/0...tive-surnames/
May 30 '07 #4

P: n/a
Message-ID: <b7************@ophelia.g5n.co.ukfrom Toby A Inkster
contained the following:
>almost like a spreadsheet ;)

Use the HTML <tableelement.

I'm still not entirely sure what the question is.
Neither am I but here's the answer
http://www.google.co.uk/search?clien...=Google+Search

for instance...
http://www.paragoncorporation.com/Ar...x?ArticleID=25

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
May 30 '07 #5

P: n/a
Sorry Guys, one of my blonde moments,

How do I generate a crosstab report, or a tabular report or an html table
that looks like a crosstab report, using PHP?

Cheers
"Geoff Berrow" <bl******@ckdog.co.ukwrote in message
news:8b********************************@4ax.com...
Message-ID: <b7************@ophelia.g5n.co.ukfrom Toby A Inkster
contained the following:
almost like a spreadsheet ;)
Use the HTML <tableelement.

I'm still not entirely sure what the question is.

Neither am I but here's the answer
http://www.google.co.uk/search?clien...=Google+Search
>
for instance...
http://www.paragoncorporation.com/Ar...x?ArticleID=25

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

May 30 '07 #6

P: n/a
Message-ID: <8t*******************@news.indigo.iefrom Johny Begood
contained the following:
>Sorry Guys, one of my blonde moments,

How do I generate a crosstab report, or a tabular report or an html table
that looks like a crosstab report, using PHP?
Usually the output from a query is a number of rows each row being an
array of values. For instance with mysql you might do something like
this

$sql="Select etc etc";
$result=mysql_query($sql);
$result_table="<table>\n<tr>\n";
$result_table.=<th>col1</th><th>col1</th><th>col1</th>\n";
while($myrow=mysql_fetch_assoc($result)){
$result_table.="<tr>\n<td>$myrow[col1]</td><td>$myrow[col2]</td><td>$myrow[col3]</td>\n</tr>\n";
}
$result_table.="</table>";

echo $result_table;
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
May 30 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.