in reply to MYSQL $dbh->do

I tried this buti t ain no placeholer and I get an error.

Did you really manage to create a table with a column named 'key'? I kinda doubt it. 'KEY' is a reserved word (in ANSI92 SQL as well as in MySQL). Consult the reserved word table in your MySQL doc.