in reply to (OT) MySQL Help

Assuming you've got a valid $dbh, $id and an array with all the table names...
for (@table_names) { my ($mark) = $dbh->selectrow_array("select Mark from $_ where id = $ +id"); }
and might I say you really really have to rethink your database schema.

update: check out DBI