How to get a single value from MySQL(executescalar in .NET)?
Posted: 14.10.2010, 16:34
Hi all.
Although I have extensive programming experience I am new to Delphi (ver. 7) and Zeos.
More or less I was able to figure out how to use Zeos objects and how to link them to controls etc.
What I was unable to figure is how to use command in SQL language to find and get single value from some table.
For example.
I want to use SQL command:
and to get single integer value.
Up to now I executing SQL commands trough ZSQLProcessor and this works fine but there is no returning value.
I hope the questions is not too stupid
Thanks in advance.
Although I have extensive programming experience I am new to Delphi (ver. 7) and Zeos.
More or less I was able to figure out how to use Zeos objects and how to link them to controls etc.
What I was unable to figure is how to use command in SQL language to find and get single value from some table.
For example.
I want to use SQL command:
Code: Select all
SELECT UserID FROM Users WHERE FirstName = 'John'
Up to now I executing SQL commands trough ZSQLProcessor and this works fine but there is no returning value.
I hope the questions is not too stupid
Thanks in advance.