bind parameter for LIMIT statement
[prev]
[thread]
[next]
[Date index for 2005/01/25]
Hi,
I want to create a search with a limit statement, eg :
__PACKAGE__->add_constructor(lasts =3D> 'keywords LIKE ? ORDER BY date
DESC LIMIT ?');
to get the last nth rows with My::Package->lasts("foo%", 10);
The problem is that bindings are expanded with quotes, and MySQL does
not like quotes for LIMIT : it's ok the right part of LIKE operator
(keywords like 'foo%'), but not for LIMIT : LIMIT '10' produces syntax
error.
Same thing with set_sql of course... help welcome !
--=20
Julien GILLES.
This email communication is confidential and is intended solely for whom =
it is addressed. Copying, or re-using in any way by anyone else is =
unauthorised. Any views or opinions expressed are those of the author =
and do not necessarily represent those of GL TRADE or any of its =
affiliates.=20
If you have received this mail in error, please destroy the copy in your =
possession and notify abuse@xxxxxxx.xxx
|
bind parameter for LIMIT statement
Julien GILLES 15:20 on 25 Jan 2005
|