Hello,
On 12/8/12 6:53 PM, Krishna Kurapati wrote:
Hi,
I need a way to limit the results to just one row. The only way I know
I could do is to call db_query followed by fetch_result of 1 row.
However this is not optimal as all the rows are fetched to dynamic
memory with db_query.
Is there an alternative approach?
you can't set limit in the query() function
of the DB API -- this is an
abstract layer that is not only for SQL server, working also for
berkeley db or text files. You can use raw_query(), building your own
sql statement as you like.
Cheers,
Daniel
Thanks
Krish Kura
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda