Commit 597dc491 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Replace a couple of obsolete calls to fetch_row, with fetchrow_array.

parent f7e9b0dd
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004, 2005, 2009 University of Utah and the Flux Group.
# Copyright (c) 2004-2011 University of Utah and the Flux Group.
# All rights reserved.
#
# deletenode - a script for deleting a node from the database
......@@ -60,7 +60,7 @@ my $result = DBQueryFatal("select role from nodes where node_id='$node'");
if ($result->num_rows() != 1) {
die "Node $node does not exist!\n";
}
my ($role) = $result->fetch_row();
my ($role) = $result->fetchrow_array();
if ($role ne "testnode") {
die "Node $node is not a testnode!\n";
}
......@@ -90,7 +90,7 @@ my @subnodes;
$result = DBQueryFatal("select node_id from nodes where ".
"node_id!=phys_nodeid and phys_nodeid='$node' ".
"and role='testnode'");
while (my ($subnode) = $result->fetch_row()) {
while (my ($subnode) = $result->fetchrow_array()) {
push(@subnodes, $subnode);
}
if (@subnodes > 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment