in reply to More DBI Problems!!!

Since no one else has said anything about it, you don't have 'slam' all of your SQL code together, you can format it nicely:
$dbh->prepare(' SELECT message_table.message_id, message_table.message_date, message_table.message_time,message_table.message_sender_name, message_table.message_to_name, message_table.department_id FROM department_table INNER JOIN message_table ON department_table.department_id = message_table.department_id WHERE message_table.department_id = ? ');
much easier to find errors that way - but as said previously, the SQL is not the problem, it was your method of getting the data. I hope you find this helpful in the future, none the less.

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--