Thank you for your very informative SQLite tutorial
I have a question:
when in need to use a SQL function in a query (eg MAX(), COUNT(),...) how can I manage its result?
in the following example of SQL query the value returned by the query shold be the total number of records; I understand that a callback function works on all subsequent records in a query; how can I manage the result of COUNT() function, eg print or store it in a variable?
--- query example (general) ----
SELECT COUNT(field) FROM database
the query shold return the number of records in database "database" where the field "field" is not null (this is my guess)
in BlitzMax we should have something like this:
rc = sqlite3_exec(db, "SELECT COUNT(field) FROM database",callback, Null, Null)
If I don't use a callback function ( ... null,null,null) how can I manage the result of SELECT statement?
If I use a callback function (normally called on every record) what are the parameters to use (where is the returned value stored)?
bye
allox
I have a question:
when in need to use a SQL function in a query (eg MAX(), COUNT(),...) how can I manage its result?
in the following example of SQL query the value returned by the query shold be the total number of records; I understand that a callback function works on all subsequent records in a query; how can I manage the result of COUNT() function, eg print or store it in a variable?
--- query example (general) ----
SELECT COUNT(field) FROM database
the query shold return the number of records in database "database" where the field "field" is not null (this is my guess)
in BlitzMax we should have something like this:
rc = sqlite3_exec(db, "SELECT COUNT(field) FROM database",callback, Null, Null)
If I don't use a callback function ( ... null,null,null) how can I manage the result of SELECT statement?
If I use a callback function (normally called on every record) what are the parameters to use (where is the returned value stored)?
bye
allox