Re: newbie can't see what he's doing wrong.

2003-03-12 Thread Rudy Lippan
On Wed, 12 Mar 2003, Jay G. Scott wrote: > Greetings, > > My code follows. Should be enough for some bright person to figure > out what I'm doing wrong. To me, it all looks fine. > > > #!/usr/bin/perl > > use DBI; > use Pg; You don't need Pg methinks. > use Getopt::Std; > > $DBSERVER="tor

RE: newbie can't see what he's doing wrong.

2003-03-12 Thread Brian Spindler
] Sent: Wednesday, March 12, 2003 4:16 PM To: Jay G. Scott Cc: [EMAIL PROTECTED] Subject: Re: newbie can't see what he's doing wrong. I suspect it's in the way you're setting up your query, but you didn't show that part? Try this: my $sql = 'SELECT m_id FROM machines

RE: newbie can't see what he's doing wrong.

2003-03-12 Thread Brian Spindler
:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 4:16 PM To: Jay G. Scott Cc: [EMAIL PROTECTED] Subject: Re: newbie can't see what he's doing wrong. I suspect it's in the way you're setting up your query, but you didn't show that part? Try this: my $sql = 'SELECT m_i

Re: newbie can't see what he's doing wrong.

2003-03-12 Thread Paul Boutros
I suspect it's in the way you're setting up your query, but you didn't show that part? Try this: my $sql = 'SELECT m_id FROM machines WHERE hostname = ?'; my $host = 'torn.arlut.utexas.edu'; my $sth = $dbh->prepare($sql); $sth->execute($host); while (my $m_id = $sth->fetchrow_array()) {

Re: newbie can't see what he's doing

2003-03-12 Thread Jay G. Scott
I tried it without the semicolon already, same thing happens. (But I did try it again anyway.) j. -- Jay Scott 512-835-3553[EMAIL PROTECTED] Head of Sun Support, Sr. Operating Systems Specialist Applied Research Labs, Computer Science Div. S224 Univer

Re: newbie can't see what he's doing wrong.

2003-03-12 Thread Joe Raube
For one: $command = "SELECT m_id FROM machines WHERE hostname = '$hostname';"; remove the ; within the sql string -- its not needed... i.e. '$hostname'; <--- -Joe --- "Jay G. Scott" <[EMAIL PROTECTED]> wrote: > > Greetings, > > My code follows. Should be enough for some bright person to fig

newbie can't see what he's doing wrong.

2003-03-12 Thread Jay G. Scott
Greetings, My code follows. Should be enough for some bright person to figure out what I'm doing wrong. To me, it all looks fine. #!/usr/bin/perl use DBI; use Pg; use Getopt::Std; $DBSERVER="torn.arlut.utexas.edu"; $USERNAME="postgres"; $PASSWORD=""; $dbh = DBI->connect("DBI:PgPP:database=t