From: Jimmy H. <jim...@ho...> - 2007-05-02 08:06:23
|
Hi! I´m trying to make a script for reading a number of ip-adresses in the device_port table, but when I try to connect to the database with an sql-query all I get is this error message: dbh() - db_Pg not found in config info. What am I missing? Or have I misunderstood something? My code looks like this: #! /usr/bin/perl # # Usage: # Fetch IP-adresses from routers that the script # show_mac_ip needs to be run on (for reading MAC-adresses to netdisco) # use warnings; use lib "/usr/share/perl/5.8.7"; use netdisco qw/:all/; $data = sql_rows('device_port',['ip'],{'up' => 'up'}); print $data; So far I haven´t constructed the complete sql-question (This is just for testing) It should be: SELECT ip FROM device_port WHERE up ="up" AND vlan IS NOT NULL Regards /Jimmy _________________________________________________________________ Trött på att pendla? - Sök jobb där du bor! http://jobb.msn.monster.se/ |