sqlite> .schema CREATE TABLE info ( key, name, location, pic, thumbnail, color, comment, Personal, Test_Scores, Background, Classes, Sports, Problems, Awards, Other ); sqlite> #### sqlite> select * from info where key = 'ScottyZ'; ScottyZ|ScottyZ||pics/ScottyZ.jpg|thumbs/ScottyZ.jpg|lightsteelblue|nice|||||||| sqlite> #### my $cmd = "select * from info where key = $key_sel"; $sth = $dbh->prepare($cmd); $sth->execute; my @row; while (@row = $sth->fetchrow_array() ){ print "@row\n"; my $key = $row[0]; } #### DBD::SQLite::st execute failed: no such column: ScottyZ at ./ztkdb1d line 395. Tk::Error: dbih_setup_fbav: invalid number of fields: 0, NUM_OF_FIELDS attribute probably not set right at ./ztkdb1d line 398. main::browseThis at ./ztkdb1d line 398 #### print "$key_sel\n"; my $cmd = "select * from info"; $sth = $dbh->prepare($cmd); $sth->execute; my @row; while (@row = $sth->fetchrow_array() ){ next unless $row[0] eq $key_sel; print "@row\n"; my $key = $row[0]; }