in reply to (OT) MySQL Help
for (@table_names) { my ($mark) = $dbh->selectrow_array("select Mark from $_ where id = $ +id"); } [download]
update: check out DBI