Page 1 of 1

Newbie needs help

Posted: 21.11.2008, 10:59
by tonio
Hi !

I'd just like to know how I can retrieve the result of a query like this one :

ZQuery.SQL.Text := 'SELECT COUNT(*) FROM `cars` WHERE `manuf` = 1';
ZQuery.open;


By the way, do u know where I can find comprehensive documentation for Zeoslib/Delphi ?


Thanks !

tonio

Posted: 21.11.2008, 11:25
by tonio
I've just found an answer to my 1st question :)

ZQuery.Fields[0].value;

Posted: 23.11.2008, 16:16
by mdaems
An other way is using an alias in your query : 'select count(*) as countval from...'
Then you can use the ZQuery.FieldByName('countval').Value construct.

Mark

Posted: 24.11.2008, 09:14
by tonio
Smart !

Thanks