You are here: Foswiki>RedLUG Web>DiscussionBoard (19 Aug 2005, JamesAlspach)Edit Attach
This page is for general RedLUG disussions. Note that this is not a specialized message board, just wiki pages which has an easy interface to add a comment to the end. Also note that this entire site is a discussion board of sorts, since anyone can edit any of the pages. So if you want to comment on something you see on one of these pages, just edit it directly.

If you want to create a new discussion, add a comment with a WikiWord in it starting with Discussion, like DiscussionGeneral, with a short description of what the discussion is about. After the comment is posted your WikiWord will have a question mark next to it, click on that and you will be taken to the editor for the new blank discussion page. If you add a %COMMENT% tag at the end of the page then that page will have a comment field like this one does (for an example click on 'Raw Text' at the bottom of this page, and the source text for this page will be shown).

-- KevinSeghetti - 30 Apr 2005

  • In this case my query has to return a single value. This way I can drop the query into the config file (basically, the dialplan allows, as one of its options, a mysql query). In order to do any scripting, where I could iterate over values, I would have to call an outside program, which is doable but, for now, I want to try to keep everything in the one file. -- JamesAlspach - 19 Aug 2005 %TIME%
  • If you are calling it more than once, then a faster way would be to leave off the offset and limit parameters and allow the query to return multiple rows, and then iterate the returned rows, since then you are only issuing a single query. -- KevinSeghetti - 18 Aug 2005 %TIME%
  • Kevin; Thanks for that. I knew there had to be a way. That will be fantastic. I can just inc the offset for each new attempt (up to the number of carriers I have). You rock! Now, if only I had time this weekend to work on it... -- JamesAlspach - 13 Aug 2005 %TIME%
  • It would help if I could see your query. Assuming it looks something like this select MIN(field) from table; then this should return the same result select field from table order by field asc limit 1; Which can easily be modified to return the 2nd record: select field from table order by field asc offset 1 limit 1; -- KevinSeghetti - 12 Aug 2005 %TIME%
  • I am working on an LCR (Least Cost Routing) engine for Asterisk and was wondering if anyone could hand me a function to retrieve only the second to minimum value from a database? I know how to use the MIN function, which will get me the best rate for a given destination but, if that route fails, I need the second best, then the third best, etc... The query must return only a single value. I could find the min and then do a second query looking for a rate that is > the min and then get the min of what is returned, but that seems clunky. Pure SQL would be best but if you know of a bang up way to do it in your language of chioce (Tim, Perl will be fine.) that is alright too. Thanks in advance for any pointers. -- JamesAlspach - 12 Aug 2005 %TIME%
  • A few meetings ago Steve Moffett asked for some suggestions as to setting up a database of wetland inhabitants (or something similar). I went home and thought about it and sent him my ideas on a database layout. I do not know if this still is (or ever was) an actual project for him but, I was curious if anyone has any thoughts on my suggestions or other ideas that may help him if it is still a need. My thoughts are at WetlandDatabase (lets see if I did that wikiword thing right.) -- JamesAlspach - 27 Jun 2005 %TIME%
  • DiscussionGeneral -- If a disucssion doesn't deserve its own page, it goes here. Mostly just here as an example, I expect most real discussions will have their own page -- KevinSeghetti - 30 Apr 2005 %TIME%
Topic revision: r11 - 19 Aug 2005, JamesAlspach
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback