Generating html tables on the fly

From: smrtalec (smrtalec_NO_SPAM_at_algxmail.com)
Date: 01/26/04

  • Next message: CBFalconer: "Re: [crosspost] Perl -> C"
    Date: Mon, 26 Jan 2004 04:10:52 GMT
    
    

    I am trying to scavange a example script I found on the web. The aubroutine
    is below. Basically I want to extract data from a sql db then generate a
    table of values on the fly. The script below keeps generating a malformed
    header error

    sub gen_table {
        my $array_ref=query_data('%Ave%');

        my @headings = ('id no.','street no.','street name','city');
        my @rows = th(\@headings);
        foreach my $row_array (@$array_ref) {
            my ($id,$str_no,$str_name,$city) = @$row_array;
            push(@rows,"td([$id,$str_no,$str_name,$city])");
        }
        print table({-border=>undef,-width=>'25%'},
                caption(b('Wow. I can multiply!')),
                Tr(\@rows)
                    );

    }


  • Next message: CBFalconer: "Re: [crosspost] Perl -> C"

    Relevant Pages

    • Re: Vista hosting XPe tools/db
      ... Are you running this script on the machine that actually has the SQL server ... machine hosting the database. ... i don't know if you can install a second instance of SQL ...
      (microsoft.public.windowsxp.embedded)
    • Re: ActiveX script works in DTS but not in job, why?
      ... Account that SQL Agent runs under and it is a Local Admin on the box. ... As another test I saved the script as a .vbs file and tried running it, ... Microsoft OLE DB Provider for SQL Server ... that would be since I need to be able to load DTS packages from either a SQL ...
      (microsoft.public.sqlserver.dts)
    • Re: Enterprise Manager Newbie Question
      ... a SQL backup is not a simple copy of the database files. ... Is it possible to write a script that one could run from a workstation and ...
      (microsoft.public.sqlserver.tools)
    • Re: Vista hosting XPe tools/db
      ... here's an alternative script using the Microsoft ADO as ... opposed to the SQL DMO - this should allow this script to work ... Microsoft Windows XP Embedded Test Team ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
      (microsoft.public.windowsxp.embedded)
    • Re: SQL Security
      ... except I'm having problems making it work in a script. ... ;Set properties of DB objects and open connection to database ... > from Books Online (within the SQL Server program group): ... > communicate with SQL Server. ...
      (microsoft.public.sqlserver.server)