$sport = 'basket ball' $sth5 = $dbh->prepare("SELECT round, teamname, score from trees where sport =\'$sport\' AND year = \'$year\', ORDER BY round DESC") || die "Can't prepare SQL get data statement"; $sth5->execute || die "can't execute sql statement";