[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Breaking out of a function loop when querying a database that returns multiple rows of data
- From: Alexey Melnichuk <alexeymelnichuck@...>
- Date: Tue, 22 Sep 2015 08:15:13 +0400
> local todnew_query = string.format("select
> priority,dayofmonth,month,year,dayofmonth from timeofday_new where
> todname='sales' order by priority;")
> assert
> (dbh:query(todnew_query,function(todresult)
> Now with using the function it loops through the rows, in this
> case, priority 1 and 2 rows, but if I match on the first entry with an if statement, such as;
It hard to say if you do not say which lib you use. I assume you use
FS. If so just return any number > 0. Otherwise read the doc/source.
Or try return different values
--
С уважением,
Alexey mailto:alexeymelnichuck@gmail.com
---
Это сообщение проверено на вирусы антивирусом Avast.
https://www.avast.com/antivirus