El Lunes, 28 de Diciembre de 2009, Jeremy Evans escribió:
> On Dec 27, 8:32 am, Iñaki Baz Castillo <[email protected]> wrote:
> > Hi, I want to do a prepared statement like this:
> >
> >   PREPARE my_ps FROM 'SELECT COUNT(*) FROM `?`';
> >
> > So later I could invoke the ps by passing the table name:
> >
> >   SET @sequel_arg_1 = 'som_table';
> >
> > Unfortunatelly I don't get it working with Sequel DataSet#prepare. Any
> > tip? Thanks a lot.
> 
> I don't believe MySQL supports that.  That prepared statement doesn't
> have any prepared arguments, it just does a count from a table
> named ?.

You are totally right:

mysql> PREPARE ps_table_rows FROM 'SELECT COUNT(*) FROM ?';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
'?' at line 1

-- 
Iñaki Baz Castillo <[email protected]>

--

You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.


Reply via email to