Recent

Author Topic: Mysql error with user defined variable  (Read 4332 times)

ipkwena

  • Newbie
  • Posts: 4
Mysql error with user defined variable
« on: January 23, 2011, 04:01:44 pm »
...in design mode, i am able to activate a zeos query with the following sql statement:

SELECT
item, count(item) as entries,
(@row:=@row+1) AS row
FROM tbl_projcosts,
(SELECT @row:=0) AS row_count
group by projectno
order by
row

but when running the code, the application complains with this message:
"Error reading ZQuery2.SQL.Strings: Incorrect token followed by ':'"

when executing the statement in mySQL Query Browser, then a valid result set is returned.

i am using lazarus 0.9.28.2 beta; Zeos DBO 6.6.6; Mysql 5.1.47; OS = windows 7 starter.

any advise?
 

 

TinyPortal © 2005-2018