[EMAIL PROTECTED] wrote: <snip>
You were so close! Try it more like this:SET sSQL=CONCAT('SELECT * FROM ', passed_in_db_name, '.sites WHERE site_name=?');PREPARE query_statement from sSQL
<snip> Doh!I cannot believe that I didn't think of that - seems I was being dense after all!
Thanks Shawn will give it a try Rory -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]