|
On Thu, Sep 8, 2016 at 8:26 PM, Leinen, Rick <RLeinen@leviton.com> wrote:I see how you can print the values in a database table using db:nrows in a For statement, but what if I want just a single entry?
Using a for loop with db:nrows takes care of the prepare, step, and finalize that are necessary. So, it is usually the easiest approach. Why are you not interested in all the results of the query? Perhaps you should use 'limit 1' if you only want one result.