Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!goanna.cs.rmit.edu.au!news.apana.org.au!cantor.edge.net.au!news.teragen.com.au!news.access.net.au!news.mel.connect.com.au!news.syd.connect.com.au!news.bri.connect.com.au!fjholden.OntheNet.com.au!not-for-mail From: Tony Griffiths <tonyg@OntheNet.com.au> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Wanted-database for Freebsd Date: Sun, 09 Mar 1997 12:47:09 +1000 Organization: On the Net (ISP on the Gold Coast, Australia) Lines: 71 Message-ID: <332224AD.73BD@OntheNet.com.au> References: <5fpsqe$nkl$1@goblin.uunet.ca> <01bc2bed$02b52240$945e60ce@traffic> Reply-To: tonyg@OntheNet.com.au NNTP-Posting-Host: swanee.nt.com.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (WinNT; I) Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:36796 David A. Hauan wrote: > > Karen <karen@progress.ca> wrote in article > <5fpsqe$nkl$1@goblin.uunet.ca>... > > Looking for a database for the Freebsd/OS > > Thanks > > > > > mSQL is quite nice. > > Dave I would second the above... We're using mSQL here and it is working quite nicely. Version 2.0 should be even better! Currently, I'm in the process of 'extending' W3-mSQL (the embedded WWW/HTML/mSQL CGI stuff) to make it more useful for extracting data from an mSQL dB and generating reports. Basically, I've added - <! msql do_while <expr> > ... some HTML or other msql statements ... <! msql done > to the parser/processor to allow iterating through a query result better than the rather limited "print_rows" facility. I've also fixed the missing "fetch" command for stepping to the next row of the query result. For some reason, it was missing from the table of valid msql keywords! When I'm confident that it is all working OK I will make the modified code available to all who want it. An example of what mSQL/HTML can be done with the modified w3-msql is- ... stuff deleted ... <! msql if ("$totdue" == "") > <! msql set $totdue = 0 > <! msql fi > <! msql if ("$ovrdue" == "") > <! msql set $ovrdue = 0 > <! msql fi > <! msql query "select * from account where accurrbal>0 or acc30over>0 or acc60over>0 or acc90over>0 order by acname" q1 > <! msql set $row = 0 > <! msql set $sumdue = 0 > <! msql set $sumovr = 0 > <table border=1> <tr align=center><td>Username</td><td>Total Balance</td><td>Overdue Balance</td><td>Status</td> <! msql do_while ($row < $NUM_ROWS) > <! msql set $ovr = ((@q1.23 + @q1.24 + @q1.25)/100) > <! msql set $bal = ((@q1.22/100) + $ovr) > <! msql set $sumovr = ($sumovr + $ovr) > <! msql set $sumdue = ($sumdue + $bal) > <! msql if (($bal >= $totdue) || ($ovr >= $ovrdue)) > <! msql print "<tr align=left><td>@q1.0</td><td align=right>$bal</td><td align=right>$ovr</td><td align=center>@q1.14</td>" > <! msql fi > <! msql set $row = $row + 1 > <! msql if ($row != $NUM_ROWS) > <! msql fetch q1 > <! msql fi > <! msql done > </table> <hr> ... stuff deleted ...