<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    <div class="moz-cite-prefix">On 12/8/12 6:53 PM, Krishna Kurapati
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAOzCjAfD9y=1pdL8oHm48yhnuCanGf44vwpmrHpWV2tNr2WDJA@mail.gmail.com"
      type="cite">Hi,
      <div><br>
      </div>
      <div>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.</div>
      <div><br>
      </div>
      <div>Is there an alternative approach?</div>
    </blockquote>
    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.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote
cite="mid:CAOzCjAfD9y=1pdL8oHm48yhnuCanGf44vwpmrHpWV2tNr2WDJA@mail.gmail.com"
      type="cite">
      <div><br>
      </div>
      <div>Thanks</div>
      <div><br>
      </div>
      <div>Krish Kura</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>