Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Monitoring mysql tables in perl

by blue_cowdawg (Monsignor)
on Jan 10, 2013 at 14:56 UTC ( #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
Node Status?
node history
Node Type: note [id://1012676]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2018-06-24 17:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?