<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>
Yup - got it to work - but it is so much hassle that I might seriously
reconsider having queries run across databases, as it works fine for one
or two stored procs, but I really cannot imagine doing hundreds this
way! Only change I had to make was to put the @ in front of the variable
name otherwise the prepare statement bombs!
Thanks Shawn and Martijn for the help
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]