Crosstab Report

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Johnny BeGood

    Crosstab Report

    Hi All,

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

    Any help gratefuly accepted

    Cheers

  • Toby A Inkster

    #2
    Re: Crosstab Report

    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.co mpany_id
    WHERE c.country='de' AND p.forename='Han s';

    --
    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

    Comment

    • Johnny BeGood

      #3
      Re: Crosstab Report

      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" <usenet200705@t obyinkster.co.u kwrote in message
      news:7k10j4-h76.ln1@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.co mpany_id
      WHERE c.country='de' AND p.forename='Han s';
      >
      --
      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/

      Comment

      • Toby A Inkster

        #4
        Re: Crosstab Report

        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

        Comment

        • Geoff Berrow

          #5
          Re: Crosstab Report

          Message-ID: <b770j4-h76.ln1@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


          for instance...


          --
          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/

          Comment

          • Johny Begood

            #6
            Re: Crosstab Report

            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" <blthecat@ckdog .co.ukwrote in message
            news:8bvq535fi5 dd89jtsiel7vjdi va19kerv2@4ax.c om...
            Message-ID: <b770j4-h76.ln1@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...

            >
            --
            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/

            Comment

            • Geoff Berrow

              #7
              Re: Crosstab Report

              Message-ID: <8tf7i.19983$j7 .373786@news.in digo.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_q uery($sql);
              $result_table=" <table>\n<tr>\n ";
              $result_table.= <th>col1</th><th>col1</th><th>col1</th>\n";
              while($myrow=my sql_fetch_assoc ($result)){
              $result_table.= "<tr>\n<td>$myr ow[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/

              Comment

              Working...