Re: How to execute prepare statement when the placeholder is a specific table name?

2009-02-15 Thread Joerg Bruehe
Hi, I made a silly typo: Joerg Bruehe wrote: > [[...]] > > So allowing placeholders (variables) for identifiers (table, column, and > other database object names) would block (future) optimization. > > That is (probably) the reason why the SQL standard also does not allow > this.

Re: How to execute prepare statement when the placeholder is a specific table name?

2009-02-15 Thread Joerg Bruehe
Hi all! Paul DuBois wrote: > > On Feb 14, 2009, at 8:00 PM, Moon's Father wrote: > >> Thanks for your fast reply. >> >> Do you know MySQL will support this feature in the future? (("this feature" = placeholders for table names in prepared statements)) > > It doesn't need to. Baron indicated h

Re: How to execute prepare statement when the placeholder is a specific table name?

2009-02-15 Thread Paul DuBois
On Feb 14, 2009, at 8:00 PM, Moon's Father wrote: Thanks for your fast reply. Do you know MySQL will support this feature in the future? It doesn't need to. Baron indicated how you can solve this problem. If you look at prepared statements in general (not just for MySQL), placeholders ar

Re: How to execute prepare statement when the placeholder is a specific table name?

2009-02-14 Thread Moon's Father
Thanks for your fast reply. Do you know MySQL will support this feature in the future? On Sun, Feb 15, 2009 at 12:59 AM, Baron Schwartz wrote: > Hello, > > On Sat, Feb 14, 2009 at 11:15 AM, Moon's Father > wrote: > > Here is my routine. > > DELIMITER $$ > > > > CREATE > >PROCEDURE `t_girl

Re: How to execute prepare statement when the placeholder is a specific table name?

2009-02-14 Thread Baron Schwartz
Hello, On Sat, Feb 14, 2009 at 11:15 AM, Moon's Father wrote: > Here is my routine. > DELIMITER $$ > > CREATE >PROCEDURE `t_girl`.`sp_join2`() >BEGIN >set @a = 'a'; >set @b = 'g'; >set @stmt = concat('select * from ?,? where a.id = g.id'); >prepare s1 from @stmt; >exec