git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@85
c11ca15a-4712-0410-83d8-
924469b57eb5
####
# Usage: &dbGetRowInfo($table);
sub dbGetRowInfo {
- &DEBUG("STUB: dbGetRowInfo().");
+ my ($table) = @_;
+
+ my $query = "SHOW COLUMNS from $table";
+ my %retval;
+
+ my $sth = $dbh->prepare($query);
+ &SQLDebug($query);
+ if (!$sth->execute) {
+ &ERROR("GRI => '$query'");
+ &SQLDebug($DBI::errstr);
+ }
+
+ my @cols;
+ while (my @row = $sth->fetchrow_array) {
+ push(@cols, $row[0]);
+ }
+ $sth->finish;
+
+ return @cols;
}
#####