[CDBI] how to use variable as col
umn name in set _sql
pangaoyong at 126.com
Fri Jun 9 04:19:01 BST 2006
Thanks, it is very clear and works now.
·¢¼þÈË:"Rod McChesney" <rod.mcchesney at gmail.com>
ÊÕ¼þÈË:"pangaoyong" <pangaoyong at 126.com>
³ËÍ:"classdbi" <classdbi at lists.digitalcraftsmen.net>
Ö÷Ìâ:Re: [CDBI] how to use variable as column name in set _sql
On 6/8/06, pangaoyong <pangaoyong at 126.com> wrote:
> DBD::mysql::st execute failed: 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 3 [for Statement "
> SELECT DISTINCT price
> FROM product
> WHERE name = ? order by
> you could see that the second %s is not passed in, the first %s is ok, could
> someone give me a clue?
Looks to me like you need a second argument for the "order by" %s:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ClassDBI