Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Monitoring mysql tables in perl

by blue_cowdawg (Monsignor)
on Jan 10, 2013 at 14:56 UTC ( [id://1012676]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $database = 'co_sysdev';
    my $server = 'devqa_dbm.hq.co.corp';
    my $user = 'web';
    my $passwd = '3br!';
    my $row = "";
    
  2. or download this
    my $homologs = DBI->connect("dbi:mysql:database=co_sysdev;host=devqa_d
    +bm.corp;port=3310",'username','password');
    
  3. or download this
    #my $query_params = "select * from system_params";
    # render the result in a graph format
    ...
    #my $query = "describe submission_batch"; 
    #my $query = "show tables";
    my $sql_params = $homologs->prepare($query_params);
    
  4. or download this
    
    my $query_coding_event = "select * from coding_event";
    my $query_params = "select * from co_event";
    
    my $sql_params = $homologs->prepare($query_params);
    
  5. or download this
    while (my $row = $sql_params->fetchrow_arrayref) {
        #print join("\t", @$row), "\n";
        print join(@$row), "\n";
        print @$row . " \n";
    }
    
  6. or download this
    $ perl -e 'print join(qw/a b c d e f/),"\n"'
    bacadaeaf
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1012676]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-26 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found